Fixing None fallback
@@ -602,7 +602,7 @@ def publish(request, shortkey, *args, **kwargs):
def set_resource_flag(request, shortkey, *args, **kwargs):
# only resource owners are allowed to change resource flags
res, _, user = authorize(request, shortkey, needed_permission=ACTION_TO_AUTHORIZE.SET_RESOURCE_FLAG)
- t = request.POST.get('t', request.data.get('t'))
+ t = request.POST.get('t', request.data.get('t', None))
if t == 'make_public':
_set_resource_sharing_status(request, user, res, flag_to_set='public', flag_value=True)
elif t == 'make_private' or t == 'make_not_discoverable':
