Check image revision_number before string format due to "'revision_number' cannot be null" #950
1 files changed, 4 insertions(+), 1 deletions(-) M src/wiki/plugins/images/models.py
M src/wiki/plugins/images/models.py => src/wiki/plugins/images/models.py +4 -1
@@ 101,7 101,10 @@ class ImageRevision(RevisionPluginRevision): ordering = ('-created',) def __str__(self): return gettext('Image Revision: %d') % self.revision_number if self.revision_number: return gettext('Image Revision: %d') % self.revision_number else: return gettext('Current revision not set!!') def on_image_revision_delete(instance, *args, **kwargs):