summaryrefslogtreecommitdiff
path: root/archaeological_files/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-14 21:24:46 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-14 21:24:46 +0200
commita20eb71ee2cca0b85bdaed31464f2a72a6e27f56 (patch)
tree46790ab96aa34ec81cd1216eff4518197b35cb9d /archaeological_files/models.py
parent75eba6fe02babf4a4e86997578e2caf9f7ba828e (diff)
downloadIshtar-a20eb71ee2cca0b85bdaed31464f2a72a6e27f56.tar.bz2
Ishtar-a20eb71ee2cca0b85bdaed31464f2a72a6e27f56.zip
New migration management
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r--archaeological_files/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index 08c7edf8c..412cceb46 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -26,7 +26,8 @@ from django.db.models import Q, Count, Sum
from django.db.models.signals import post_save, m2m_changed, post_delete
from django.utils.translation import ugettext_lazy as _, ugettext
-from ishtar_common.utils import cached_label_changed, get_cache
+from ishtar_common.utils import cached_label_changed, get_cache, \
+ get_current_year
from ishtar_common.models import GeneralType, BaseHistorizedItem, \
HistoricalRecords, OwnPerms, Person, Organization, Department, Town, \
@@ -105,8 +106,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,
}
# fields
- year = models.IntegerField(_(u"Year"),
- default=lambda: datetime.datetime.now().year)
+ year = models.IntegerField(_(u"Year"), default=get_current_year)
numeric_reference = models.IntegerField(
_(u"Numeric reference"), blank=True, null=True)
internal_reference = models.CharField(_(u"Internal reference"), blank=True,