Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
704027af
authored
Feb 27, 2015
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: fix TypeError in add_blacklist_item()
parent
9a6884bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/firewall/views.py
+3
-2
No files found.
circle/firewall/views.py
View file @
704027af
...
@@ -87,8 +87,9 @@ def add_blacklist_item(request):
...
@@ -87,8 +87,9 @@ def add_blacklist_item(request):
pass
pass
now
=
timezone
.
now
()
now
=
timezone
.
now
()
can_update
=
((
obj
.
whitelisted
and
now
>
obj
.
expires_at
)
or
can_update
=
(
not
obj
.
whitelisted
)
(
obj
.
whitelisted
and
obj
.
expires_at
and
now
>
obj
.
expires_at
)
or
not
obj
.
whitelisted
)
is_new
=
created
or
(
obj
.
expires_at
and
now
>
obj
.
expires_at
)
is_new
=
created
or
(
obj
.
expires_at
and
now
>
obj
.
expires_at
)
if
created
or
can_update
:
if
created
or
can_update
:
...
...
Write
Preview
Markdown
is supported
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