oplus/epm/record.py
def set_defaults(self):
        """
        sets all empty fields for which a default value is defined to default value
        """
        defaults = {}
        for i in range(len(self)):
            if i in self._data:
                continue
            default = self.get_field_descriptor(i).tags.get("default", [None])[0]
            if default is not None:
                defaults[i] = default

        self.update(defaults)
def set_defaults(self):
        defaults = {}
        for i in range(len(self)):
            if i in self._data:
                continue
            default = self.get_field_descriptor(i).tags.get("default", [None])[0]
            if default is not None:
                defaults[i] = default

        self.update(defaults)
def set_defaults ( self ) : defaults = { } for i in range ( len ( self ) ) : if i in self . _data : continue default = self . get_field_descriptor ( i ) . tags . get ( "default" , [ None ] ) [ 0 ] if default is not None : defaults [ i ] = default self . update ( defaults )
sets all empty fields for which a default value is defined to default value
sets all empty fields for which a default value is defined to default value