diff options
author | Anssi Kääriäinen <anssi.kaariainen@thl.fi> | 2015-02-26 16:19:17 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-03-25 08:16:12 -0400 |
commit | 8f30556329b64005d63b66859a74752a0b261315 (patch) | |
tree | 73b5ac8d3be457f8061aa270437c9a957d2d622c /django/db/backends/postgresql_psycopg2/operations.py | |
parent | f9c70bb3a1239ed1e04a769fd323286a5b1fde20 (diff) | |
download | django-8f30556329b64005d63b66859a74752a0b261315.tar.gz |
Renamed Field.rel attribute to remote_field
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/operations.py')
-rw-r--r-- | django/db/backends/postgresql_psycopg2/operations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py index 7483d97aee..df96d16ad2 100644 --- a/django/db/backends/postgresql_psycopg2/operations.py +++ b/django/db/backends/postgresql_psycopg2/operations.py @@ -172,7 +172,7 @@ class DatabaseOperations(BaseDatabaseOperations): ) break # Only one AutoField is allowed per model, so don't bother continuing. for f in model._meta.many_to_many: - if not f.rel.through: + if not f.remote_field.through: output.append( "%s setval(pg_get_serial_sequence('%s','%s'), " "coalesce(max(%s), 1), max(%s) %s null) %s %s;" % ( |