dont remove subscribers from private lists

This commit is contained in:
j 2011-11-06 15:29:22 +01:00
parent a3fa711b51
commit a265135654

View file

@ -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