add temporary access when database is empty
This commit is contained in:
@@ -8,3 +8,7 @@ from src.db.models.admin import Profile
|
||||
def get_profile(username: AnyStr, db: Session) -> Optional[Profile]:
|
||||
profile = db.query(Profile).filter(Profile.email == username).first()
|
||||
return profile
|
||||
|
||||
def is_database_empty(db: Session) -> bool:
|
||||
profiles = db.query(Profile).all()
|
||||
return len(profiles) == 0
|
||||
|
||||
Reference in New Issue
Block a user