X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ce8d791a5298e0cb2569034aec4c8b57afac97b2..4cdc0fc88d27843994fb6203eb4e5898f46c2c83:/apps/wiki/views.py diff --git a/apps/wiki/views.py b/apps/wiki/views.py index 0455bdde..2a317f25 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -229,7 +229,11 @@ def diff(request, slug, chunk=None): doc = Chunk.get(slug, chunk) except (Chunk.MultipleObjectsReturned, Chunk.DoesNotExist): raise Http404 - docA = doc.at_revision(revA).materialize() + # allow diff from the beginning + if revA: + docA = doc.at_revision(revA).materialize() + else: + docA = "" docB = doc.at_revision(revB).materialize() return http.HttpResponse(nice_diff.html_diff_table(docA.splitlines(),