application_approved() method added

This commit is contained in:
Profitroll 2022-12-16 11:27:56 +01:00
parent b0a3830c4f
commit 9fb095b7c6
1 changed files with 8 additions and 0 deletions

View File

@ -274,6 +274,14 @@ class HoloUser():
else:
return tmp_application["state"], tmp_application["complete"]
def application_approved(self) -> bool:
"""Check whether user has a completed application and it got approved
### Returns:
* `bool`: `True` if yes and `False` if no
"""
return True if col_applications.find_one({"user": self.id}) is not None else False
def application_restart(self) -> None:
"""Reset application of a user in tmp collection and replace it with an empty one
"""