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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aymeric Chaumont
ViaResto-website
Merge requests
!5
Waiting time component
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Waiting time component
waiting-time-component
into
main
Overview
0
Commits
2
Pipelines
0
Changes
13
Merged
Aymeric Chaumont
requested to merge
waiting-time-component
into
main
2 years ago
Overview
0
Commits
2
Pipelines
0
Changes
13
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
6049ec99
2 commits,
2 years ago
13 files
+
146
−
20
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
Search (e.g. *.vue) (Ctrl+P)
backend/db/crud.py
+
7
−
1
Options
@@ -17,4 +17,10 @@ def create_record(new_record: schemas.RecordBase, db: Session):
db
.
add
(
db_record
)
db
.
commit
()
db
.
refresh
(
db_record
)
return
db_record
\ No newline at end of file
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