Changed class methods to static methods
This commit is contained in:
parent
9bce8b0a46
commit
b2dc4856cb
@ -12,7 +12,7 @@ class User(db.Model):
|
|||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
return {"id": self.id, "username": self.username, "email": self.email, "role": self.role}
|
return {"id": self.id, "username": self.username, "email": self.email, "role": self.role}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
def get_editable_fields():
|
def get_editable_fields():
|
||||||
return {"username", "email", "role", "password"}
|
return {"username", "email", "role", "password"}
|
||||||
|
|
||||||
@ -33,6 +33,6 @@ class Task(db.Model):
|
|||||||
"done": self.done,
|
"done": self.done,
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@staticmethod
|
||||||
def get_editable_fields():
|
def get_editable_fields():
|
||||||
return {"title", "description", "due_date", "done"}
|
return {"title", "description", "due_date", "done"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user