diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-12-18 19:52:03 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-12-18 19:52:03 +0100 |
commit | d6abeb1ce8d284e387c1637bae2ef911c707f6aa (patch) | |
tree | 470e0eda068d37e87e5a1e9b90e40319aa9d5abf /ishtar_common/models.py | |
parent | c91c8934fb31f9a2207f4a6c0bc5ea0ddae9b6af (diff) | |
download | Ishtar-d6abeb1ce8d284e387c1637bae2ef911c707f6aa.tar.bz2 Ishtar-d6abeb1ce8d284e387c1637bae2ef911c707f6aa.zip |
Fix length of town's name.
* Ready for Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch!
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 7fa2d73aa..371e74073 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -108,7 +108,8 @@ class HistoricalRecords(BaseHistoricalRecords): def create_historical_record(self, instance, type): try: history_modifier = getattr(instance, 'history_modifier', None) - except User.DoesNotExist: + assert history_modifier + except (User.DoesNotExist, AssertionError): # on batch removing of users, user could have disapeared return manager = getattr(instance, self.manager_name) @@ -825,7 +826,7 @@ class Address(BaseHistorizedItem): blank=True) postal_code = models.CharField(_(u"Postal code"), max_length=10, null=True, blank=True) - town = models.CharField(_(u"Town"), max_length=30, null=True, blank=True) + town = models.CharField(_(u"Town"), max_length=70, null=True, blank=True) country = models.CharField(_(u"Country"), max_length=30, null=True, blank=True) phone = models.CharField(_(u"Phone"), max_length=18, null=True, blank=True) |