forked from 0x2620/pandora
dont remove subscribers from private lists
This commit is contained in:
parent
a3fa711b51
commit
a265135654
1 changed files with 4 additions and 3 deletions
|
@ -310,13 +310,14 @@ def editList(request):
|
||||||
if value not in list._status:
|
if value not in list._status:
|
||||||
value = list._status[0]
|
value = list._status[0]
|
||||||
if value == 'private':
|
if value == 'private':
|
||||||
for user in list.subscribed_users.all():
|
qs = models.Position.objects.filter(user=request.user,
|
||||||
list.subscribed_users.remove(user)
|
section='section', list=list)
|
||||||
qs = models.Position.objects.filter(user=request.user, section='section', list=list)
|
|
||||||
if qs.count() > 1:
|
if qs.count() > 1:
|
||||||
pos = qs[0]
|
pos = qs[0]
|
||||||
pos.section = 'personal'
|
pos.section = 'personal'
|
||||||
pos.save()
|
pos.save()
|
||||||
|
models.Position.objects.filter(list=list,
|
||||||
|
section='public').delete()
|
||||||
elif value == 'featured':
|
elif value == 'featured':
|
||||||
if not request.user.is_staff:
|
if not request.user.is_staff:
|
||||||
value = list.status
|
value = list.status
|
||||||
|
|
Loading…
Reference in a new issue