X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/132297f0be27da544304733bd24da32282310235..507752b933a466dd8e962c0e34d0ec74d6de55b7:/apps/catalogue/views.py?ds=inline diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 2ba0fb6d..3bee9107 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -101,7 +101,7 @@ def create_missing(request, slug=None): if request.method == "POST": form = forms.DocumentCreateForm(request.POST, request.FILES) if form.is_valid(): - + if request.user.is_authenticated(): creator = request.user else: @@ -395,14 +395,14 @@ def chunk_mass_edit(request): if request.method == 'POST': ids = map(int, filter(lambda i: i.strip() != '', request.POST.get('ids').split(','))) chunks = map(lambda i: Chunk.objects.get(id=i), ids) - + stage = request.POST.get('stage') if stage: try: stage = Chunk.tag_model.objects.get(slug=stage) except Chunk.DoesNotExist: stage = None - + for c in chunks: c.stage = stage @@ -414,7 +414,7 @@ def chunk_mass_edit(request): user = User.objects.get(username=username) except User.DoesNotExist, e: user = None - + for c in chunks: c.user = user