From f2aab5b913adf65728ded560e217acea3ae2d1f9 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 20 Jun 2006 04:12:27 +0000 Subject: [PATCH] Fixed #1964 -- Fixed bug in fetching the dimensions of an ImageField. Thanks, Armin Ronacher git-svn-id: http://code.djangoproject.com/svn/django/trunk@3168 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 864363d9ee..de42a5790b 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -196,7 +196,7 @@ class Model(object): else: # Create a new record with defaults for everything. cursor.execute("INSERT INTO %s (%s) VALUES (%s)" % - (backend.quote_name(self._meta.db_table), + (backend.quote_name(self._meta.db_table), backend.quote_name(self._meta.pk.column), backend.get_pk_default_value())) if self._meta.has_auto_field and not pk_set: @@ -363,7 +363,7 @@ class Model(object): cachename = "__%s_dimensions_cache" % field.name if not hasattr(self, cachename): from django.utils.images import get_image_dimensions - filename = self._get_FIELD_filename(field)() + filename = self._get_FIELD_filename(field) setattr(self, cachename, get_image_dimensions(filename)) return getattr(self, cachename)