Commit d0e166db authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

when overwriting a version, display the deleted ids (if any)

parent 6dba797b
Pipeline #139134 failed with stages
in 2 seconds
......@@ -718,16 +718,20 @@ class WebappVersionUpdate(UserAccessMixin, UpdateView):
if version.state in (WebappVersion.READY, WebappVersion.DELETED):
# delete the version that is currently READY
deleted_versions = other_versions.filter(state=WebappVersion.READY)
deleted_ids = [ for v in deleted_versions]
if version.state == WebappVersion.DELETED:
# mark the current version as READY
version.state = WebappVersion.READY
version.deleted_at = None
messages.success(self.request, "Version %s (#%d) restored"
% (version.number,
for i in deleted_ids:
messages.success(self.request, "Version %s (#%d) deleted" % (version.number, i))
messages.success(self.request, "Version %s (#%d) restored" % (
messages.success(self.request, "Version %s (#%d) updated"
% (version.number,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment