mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
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)
This commit is contained in:
@ -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.")
|
||||
|
Reference in New Issue
Block a user