Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9325cf03
authored
Sep 11, 2013
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: fix missing prefix in IPNetworkField.get_db_prep_value()
parent
019f5766
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
circle/firewall/fields.py
+2
-2
No files found.
circle/firewall/fields.py
View file @
9325cf03
...
...
@@ -91,9 +91,9 @@ class IPNetworkField(models.Field):
if
isinstance
(
value
,
IPNetwork
):
if
self
.
version
==
4
:
return
'.'
.
join
(
map
(
lambda
x
:
"
%03
d"
%
x
,
value
.
ip
.
words
))
return
'.'
.
join
(
map
(
lambda
x
:
"
%03
d"
%
x
,
value
.
ip
.
words
))
+
'/
%
d'
%
value
.
prefixlen
else
:
return
':'
.
join
(
map
(
lambda
x
:
"
%04
X"
%
x
,
value
.
ip
.
words
))
return
':'
.
join
(
map
(
lambda
x
:
"
%04
X"
%
x
,
value
.
ip
.
words
))
+
'/
%
d'
%
value
.
prefixlen
return
value
def
value_to_string
(
self
,
obj
):
...
...
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