Commit e5b0b90f authored by Marko Kuder's avatar Marko Kuder
Browse files

Merge branch 'feature/unpublished-active-packages' into 'development'

Fix capitalization of unpublished field

See merge request !8
parents c36e83a4 6f6025f3
......@@ -171,7 +171,7 @@ def opsi_package_update(context, data_dict):
# "Vsebinski urednik", member of organization that is the owner of this package
if dgu_helpers.is_content_editor():
# reject saving active state unless it was already active and it is being saved as unpublished
if data_dict and data_dict.get('state') == 'active' and (package.state != 'active' or data_dict.get('unpublished', "false") != "true"):
if data_dict and data_dict.get('state') == 'active' and (package.state != 'active' or data_dict.get('unpublished', 'False') != 'True'):
return {'success': False,
'msg': _('Uporabnik %s nima pravic za objavo zbirke %s') %
(str(user), package.id)}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment