def __init__(self, **kwargs):
        if 'owner' in kwargs:
            user = kwargs.get('owner')
            if isinstance(user, User):
                self.owner = user.id_int
            elif isinstance(user, int):
                self.owner = user

            del kwargs['owner']

        _declarative_constructor(self, **kwargs)
Exemple #2
0
 def __init__(self, **kwargs):
     self.job_class = kwargs.pop('job_class', None)
     _declarative_constructor(self, **kwargs)
def _job_constructor(self, **kwargs):
    kwargs['job_type'] = kwargs.pop('type', None)
    _declarative_constructor(self, **kwargs)
Exemple #4
0
 def __init__(self, **kwargs):
     self.job_class = kwargs.pop('job_class', None)
     _declarative_constructor(self, **kwargs)