mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
Refactor media type check in edit_video view
Replaced 'not in' comparison with a more Pythonic 'not in' syntax for checking media type in the edit_video view.
This commit is contained in:
parent
399c06d36a
commit
2b7fdca417
@ -429,7 +429,7 @@ def edit_video(request):
|
||||
if not (request.user == media.user or is_mediacms_editor(request.user)):
|
||||
return HttpResponseRedirect("/")
|
||||
|
||||
if not media.media_type in ["video", "audio"]:
|
||||
if media.media_type not in ["video", "audio"]:
|
||||
messages.add_message(request, messages.INFO, "Media is not video")
|
||||
return HttpResponseRedirect(media.get_absolute_url())
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user