Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ViaResto-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aymeric Chaumont
ViaResto-website
Merge requests
!6
Ci
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Ci
ci
into
main
Overview
0
Commits
26
Pipelines
4
Changes
13
Merged
Ci
Antoine Gaudron-Desjardins
requested to merge
ci
into
main
Jul 6, 2022
Overview
0
Commits
26
Pipelines
4
Changes
13
0
0
Merge request reports
Viewing commit
ecd78a7a
Prev
Next
Show latest version
13 files
+
144
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
ecd78a7a
Merge branch 'main' into 'ci'
· ecd78a7a
Antoine Gaudron-Desjardins
authored
Jul 6, 2022
# Conflicts: # backend/db/crud.py
backend/db/crud.py
+
6
−
0
View file @ ecd78a7a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -18,3 +18,9 @@ def create_record(new_record: schemas.RecordBase, db: Session):
db
.
commit
()
db
.
refresh
(
db_record
)
return
db_record
def
get_waiting_time
(
place
:
str
,
db
:
Session
):
"""
Get the last estimated waiting time for the given place
"""
db_record
=
db
.
query
(
models
.
Records
).
filter
(
models
.
Records
.
place
==
place
).
order_by
(
models
.
Records
.
date
.
desc
()).
one
()
return
db_record
.
waiting_time
Loading