diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-07 22:04:17 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-07 22:04:17 +0200 |
commit | b7c4e4ef3a907c4d2e5f0053e9d7628e387fadd4 (patch) | |
tree | 3cdde95ef30583456d20421c61bd7de995011a93 /archaeological_operations/models.py | |
parent | 0a826dae3fc14fefd4bae00a84676ce88a9b7d88 (diff) | |
download | Ishtar-b7c4e4ef3a907c4d2e5f0053e9d7628e387fadd4.tar.bz2 Ishtar-b7c4e4ef3a907c4d2e5f0053e9d7628e387fadd4.zip |
Fix operation_code for year "0" and no year
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index e3453f0cf..6ae05ca30 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -359,8 +359,6 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem, @classmethod def get_available_operation_code(cls, year=None): - if not year: - year = datetime.date.today().year max_val = cls.objects.filter(year=year).aggregate( Max('operation_code'))["operation_code__max"] return (max_val + 1) if max_val else 1 |