Skip to content

Commit

Permalink
fixes aldryn configuration and an error in the link config
Browse files Browse the repository at this point in the history
  • Loading branch information
FinalAngel committed Sep 8, 2016
1 parent 9590c46 commit 4fedbbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aldryn_config.py
Expand Up @@ -15,7 +15,7 @@ class Form(forms.BaseForm):
'List of alignment types, default "left, center, right" (comma separated)',
required=False,
)
ratio = forms.NumberField(
ratio = forms.CharField(
'The ratio used to calculate the missing width or height, default "1.618"',
required=False,
)
Expand Down Expand Up @@ -52,7 +52,7 @@ def to_settings(self, data, settings):
for item in split_and_strip(data['alignment'])
]
if data['ratio']:
settings['DJANGOCMS_PICTURE_RATIO'] = data['ratio']
settings['DJANGOCMS_PICTURE_RATIO'] = float(data['ratio'])
if data['nesting']:
settings['DJANGOCMS_PICTURE_NESTING'] = data['nesting']

Expand Down
2 changes: 1 addition & 1 deletion djangocms_picture/models.py
Expand Up @@ -240,7 +240,7 @@ def get_link(self):

def clean(self):
# there can be only one link type
if self.link_page_id and self.link_page:
if self.link_url and self.link_page_id:
raise ValidationError(
ugettext('You have given both external and internal links. '
'Only one option is allowed.')
Expand Down

0 comments on commit 4fedbbe

Please sign in to comment.