Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Video AG Infrastruktur
website
Commits
8abdc85b
Commit
8abdc85b
authored
Sep 11, 2016
by
Julian Rother
Browse files
Replace debug time offset in announcement code
parent
2d4c02d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.py
View file @
8abdc85b
...
...
@@ -125,7 +125,7 @@ def rfc3339(d):
def
get_announcements
(
minlevel
=
0
):
offset
=
timedelta
()
if
ismod
():
offset
=
timedelta
(
minutes
=
10
)
offset
=
timedelta
(
hours
=
24
)
return
query
(
'SELECT * FROM announcements WHERE NOT deleted AND (time_expire ISNULL OR time_expire > ?) AND (? OR (visible AND time_publish < ?)) AND level >= ? ORDER BY level DESC'
,
datetime
.
now
()
-
offset
,
ismod
(),
datetime
.
now
(),
minlevel
)
@
app
.
template_filter
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment