diff options
author | Magnus Hagander | 2016-04-28 11:22:53 +0000 |
---|---|---|
committer | Magnus Hagander | 2016-05-14 17:49:12 +0000 |
commit | 217f9ef62aa909f1ca7d593a5267787a6fd1516a (patch) | |
tree | 8f4ef9e7ba78247cd473abbb7fe620f2afea4c78 /pgweb/profserv/models.py | |
parent | 0e2a47cf255ae2d46477e401a194b1f860bf4f0c (diff) |
Fix model warnings and deprecations
1. ForeignKey with unique -> OneToOneField
2. IPAddressField -> GenericIPAddressField
3. Fix fields with default=datetime.now() which gives server start time,
not the insert time (clearly this default was never used, and the
field was always explicitly set, but it should still not be incorrectly
defined)
Diffstat (limited to 'pgweb/profserv/models.py')
-rw-r--r-- | pgweb/profserv/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pgweb/profserv/models.py b/pgweb/profserv/models.py index 64b036af..fef5e49d 100644 --- a/pgweb/profserv/models.py +++ b/pgweb/profserv/models.py @@ -5,7 +5,7 @@ from pgweb.core.models import Organisation class ProfessionalService(models.Model): approved = models.BooleanField(null=False, blank=False, default=False) - org = models.ForeignKey(Organisation, null=False, blank=False, unique=True, + org = models.OneToOneField(Organisation, null=False, blank=False, db_column="organisation_id", verbose_name="organisation", help_text="If no organisations are listed, please check the <a href=\"/account/orglist/\">organisation list</a> and contact the organisation manager or webmaster@postgresql.org if none are listed.") |