mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-13 17:53:12 +00:00
Clean up E226 errors
This commit is contained in:
parent
71441defc4
commit
0143fb9944
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ def main_nav_js():
|
|||
def ellipsistrim(value, max_length):
|
||||
if len(value) > max_length:
|
||||
truncd_val = value[:max_length]
|
||||
if not len(value) == max_length+1 and value[max_length+1] != " ":
|
||||
if not len(value) == (max_length + 1) and value[max_length + 1] != " ":
|
||||
truncd_val = truncd_val[:truncd_val.rfind(" ")]
|
||||
return truncd_val + "..."
|
||||
return value
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ def edit(request, image_id, callback=None):
|
|||
if not image.is_editable_by_user(request.user):
|
||||
raise PermissionDenied
|
||||
|
||||
form = ImageForm(request.POST, request.FILES, instance=image, prefix='image-'+image_id)
|
||||
form = ImageForm(request.POST, request.FILES, instance=image, prefix='image-' + image_id)
|
||||
|
||||
if form.is_valid():
|
||||
form.save()
|
||||
|
|
|
|||
Loading…
Reference in a new issue