|
@@ -283,16 +283,16 @@ class UserWorkspaceFolderFileRestController(TIMWorkspaceContentRestController):
|
283
|
283
|
workspace = tmpl_context.workspace
|
284
|
284
|
|
285
|
285
|
try:
|
286
|
|
- item_saved = False
|
287
|
286
|
api = ContentApi(tmpl_context.current_user)
|
288
|
287
|
item = api.get_one(int(item_id), self._item_type, workspace)
|
|
288
|
+ label_changed = label != item.label
|
289
|
289
|
|
290
|
290
|
# TODO - D.A. - 2015-03-19
|
291
|
291
|
# refactor this method in order to make code easier to understand
|
292
|
292
|
|
293
|
293
|
with new_revision(item):
|
294
|
294
|
|
295
|
|
- if comment and label:
|
|
295
|
+ if (comment and label) or (not comment and label_changed):
|
296
|
296
|
updated_item = api.update_content(
|
297
|
297
|
item, label if label else item.label,
|
298
|
298
|
comment if comment else ''
|