Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit f2aab5b913adf65728ded560e217acea3ae2d1f9 1 parent b2e5c4e
Adrian Holovaty adrianholovaty authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/db/models/base.py
4 django/db/models/base.py
View
@@ -196,7 +196,7 @@ def save(self):
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 @@ def _get_image_dimensions(self, field):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.