adding can_be_shared
This commit is contained in:
@@ -419,8 +419,11 @@ def plannedsession_multiclone_view(
|
||||
def template_share_view(request,id=0,userid=0):
|
||||
r = getrequestplanrower(request,userid=userid)
|
||||
ps = get_object_or_404(PlannedSession,pk=id)
|
||||
ps.is_public = True
|
||||
ps.save()
|
||||
if ps.can_be_shared:
|
||||
ps.is_public = True
|
||||
ps.save()
|
||||
else:
|
||||
messages.error(request,'This planned session comes from a third party and cannot be shared')
|
||||
|
||||
return HttpResponseRedirect(reverse(template_library_view))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user