diff options
author | Michael Elkins <melkins@tislabs.com> | 2010-07-12 03:04:49 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2010-07-12 03:04:49 +0000 |
commit | 5ced52d7a6e576b23e29dd6936c1389f9a413a94 (patch) | |
tree | 99eac81da64bc5c732323223085fadf851bcbc12 /portal-gui/rpkigui/myrpki/forms.py | |
parent | 47444f3cc14fc1d81a6c05eacc01137b24e612fd (diff) |
remove roa link from address ranges which are not properly representably as prefixes
svn path=/portal-gui/rpkigui/myrpki/forms.py; revision=3392
Diffstat (limited to 'portal-gui/rpkigui/myrpki/forms.py')
-rw-r--r-- | portal-gui/rpkigui/myrpki/forms.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/portal-gui/rpkigui/myrpki/forms.py b/portal-gui/rpkigui/myrpki/forms.py index 68827066..76936b53 100644 --- a/portal-gui/rpkigui/myrpki/forms.py +++ b/portal-gui/rpkigui/myrpki/forms.py @@ -136,6 +136,9 @@ def PrefixRoaForm(prefix, *args, **kwargs): return self.cleaned_data['asns'] def clean(self): + if not prefix.is_prefix(): + raise forms.ValidationError, \ + '%s can not be represented as a prefix.' % (prefix,) if prefix.allocated: raise forms.ValidationError, \ 'Prefix is allocated to a child.' |