Skip to content

Commit

Permalink
Fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
SebCorbin committed Aug 2, 2015
1 parent 0b7f0ab commit b9e4d9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions versatileimagefield/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def save_form_data(self, instance, data):
def formfield(self, **kwargs):
# This is a fairly standard way to set up some defaults
# while letting the caller override them.
defaults = {
'form_class': SizedImageCenterpointClickDjangoAdminField
}
defaults = {}
if self.ppoi_field:
defaults['form_class'] = SizedImageCenterpointClickDjangoAdminField
if kwargs.get('widget') is AdminFileWidget:
# Ensuring default admin widget is skipped (in favor of using
# SizedImageCenterpointClickDjangoAdminField's default widget as
Expand Down

0 comments on commit b9e4d9c

Please sign in to comment.