diff options
author | Michael Elkins <melkins@tislabs.com> | 2013-02-20 21:40:53 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2013-02-20 21:40:53 +0000 |
commit | dde4e64efeb7c6cc930e49faa19502d5346bdaf6 (patch) | |
tree | b40f017fef3aa231d4fead1dbc17f97b6e837d30 /rpkid | |
parent | 505b5c0c90480309109ca56dc8775003fd9bf06e (diff) |
add is_prefix attribute to ipv6 objects so that the create roa button appears in the dashboard
svn path=/trunk/; revision=5049
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/rpki/gui/app/views.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rpkid/rpki/gui/app/views.py b/rpkid/rpki/gui/app/views.py index 2d674c95..c5e6ece1 100644 --- a/rpkid/rpki/gui/app/views.py +++ b/rpkid/rpki/gui/app/views.py @@ -209,6 +209,12 @@ def dashboard(request): x.is_prefix = False unused_prefixes_v6 = my_prefixes_v6.difference(used_prefixes_v6) + for x in unused_prefixes_v6: + try: + x.prefixlen() + x.is_prefix = True + except rpki.exceptions.MustBePrefix: + x.is_prefix = False clients = models.Client.objects.all() if request.user.is_superuser else None |