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
!31
from http to https
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
from http to https
fix_https
into
main
Overview
0
Commits
2
Pipelines
4
Changes
1
Merged
from http to https
Antoine Gaudron-Desjardins
requested to merge
fix_https
into
main
Jul 12, 2022
Overview
0
Commits
2
Pipelines
4
Changes
1
0
0
Merge request reports
Viewing commit
610ad440
Prev
Next
Show latest version
1 file
+
1
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
610ad440
fix mistake
· 610ad440
Antoine Gaudron-Desjardins
authored
Jul 12, 2022
backend/db/crud.py
+
1
−
1
View file @ 610ad440
Edit in single-file editor
Open in Web IDE
Show full file
@@ -282,7 +282,7 @@ def delete_opening_hours(id: int, db: Session):
@@ -282,7 +282,7 @@ def delete_opening_hours(id: int, db: Session):
def
get_restaurants
(
db
:
Session
):
def
get_restaurants
(
db
:
Session
):
current_date
=
datetime
.
now
(
tz
=
pytz
.
timezone
(
"
Europe/Paris
"
))
current_date
=
datetime
.
now
(
tz
=
pytz
.
timezone
(
"
Europe/Paris
"
))
weekday
,
current_time
=
current_date
.
weekday
(),
current_date
.
time
()
weekday
,
current_time
=
current_date
.
weekday
(),
current_date
.
time
()
restaurant_names
=
[
r
.
place
for
r
in
db
.
query
(
models
.
OpeningHours
.
place
.
distinct
).
distinct
()]
restaurant_names
=
[
r
.
place
for
r
in
db
.
query
(
models
.
OpeningHours
.
place
).
distinct
()]
restaurants
=
[]
restaurants
=
[]
for
name
in
restaurant_names
:
for
name
in
restaurant_names
:
Loading