diff options
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r-- | archaeological_operations/wizards.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index a14924301..cacc44da1 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2012-2013 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2012-2014 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -372,6 +372,11 @@ def is_preventive(form_name, model, type_key='operation_type', key=''): return False return func +def is_not_preventive(form_name, model, type_key='operation_type', key=''): + def func(self): + return not is_preventive(form_name, model, type_key, key)(self) + return func + def has_associated_file(form_name, file_key='associated_file', negate=False): def func(self): request = self.request |