OrganIA / organia-server

Backend of OrganIA, the organs priority matching solution
MIT License
0 stars 0 forks source link

Use decorators instead of dict for db model "updaters" #20

Closed Tina-otoge closed 1 year ago

Tina-otoge commented 3 years ago

let's have something like

class User(Model):
    @updater('email')
    def set_email(email):
        ...
        return email

instead of

class User(Model):
    UPDATERS = {'email': 'set_email'}

    def set_email(email):
        ...
        return email
Tina-otoge commented 1 year ago

Closed for inactivity