Skip to content

Commit

Permalink
[API] .all and remove Recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
HakkaOfDev committed Mar 23, 2022
1 parent 8399861 commit 66eb269
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion api/src/components/sql_app/fonction.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def set_setting(db: Session, setting: schemas.Setting):

#Fonctions for notification router
def get_notification(db: Session, skip: int = 0, limit: int = 10):
return db.query(models.Notification).order_by(desc(models.Notification.id)).offset(skip).limit(limit)
return db.query(models.Notification).order_by(desc(models.Notification.id)).offset(skip).limit(limit).all()

def post_notification(db: Session, notification: schemas.Notification):
db_notif = models.Notification(onuid=int(notification.onuid), gponPort=int(notification.gponPort),
Expand Down
1 change: 0 additions & 1 deletion api/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@

if __name__ == "__main__":
run_cache()
sys.setrecursionlimit(1500)
uvicorn.run(app, host="0.0.0.0", port=8000)

0 comments on commit 66eb269

Please sign in to comment.