Changed class methods to static methods

This commit is contained in:
Marcin-Ramotowski 2025-03-16 14:07:21 +00:00
parent 9bce8b0a46
commit b2dc4856cb

View File

@ -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"}