|
@@ -24,7 +24,8 @@ from sqlalchemy.sql.elements import and_
|
24
|
24
|
|
25
|
25
|
from tracim.lib.utils.utils import cmp_to_key
|
26
|
26
|
from tracim.lib.core.notifications import NotifierFactory
|
27
|
|
-from tracim.exceptions import SameValueError, EmptyRawContentNotAllowed
|
|
27
|
+from tracim.exceptions import SameValueError
|
|
28
|
+from tracim.exceptions import EmptyCommentContentNotAllowed
|
28
|
29
|
from tracim.exceptions import EmptyLabelNotAllowed
|
29
|
30
|
from tracim.exceptions import ContentNotFound
|
30
|
31
|
from tracim.exceptions import WorkspacesDoNotMatch
|
|
@@ -437,7 +438,7 @@ class ContentApi(object):
|
437
|
438
|
def create_comment(self, workspace: Workspace=None, parent: Content=None, content:str ='', do_save=False) -> Content:
|
438
|
439
|
assert parent and parent.type != ContentType.Folder
|
439
|
440
|
if not content:
|
440
|
|
- raise EmptyRawContentNotAllowed()
|
|
441
|
+ raise EmptyCommentContentNotAllowed()
|
441
|
442
|
item = Content()
|
442
|
443
|
item.owner = self._user
|
443
|
444
|
item.parent = parent
|
|
@@ -453,7 +454,6 @@ class ContentApi(object):
|
453
|
454
|
self.save(item, ActionDescription.COMMENT)
|
454
|
455
|
return item
|
455
|
456
|
|
456
|
|
-
|
457
|
457
|
def get_one_from_revision(self, content_id: int, content_type: str, workspace: Workspace=None, revision_id=None) -> Content:
|
458
|
458
|
"""
|
459
|
459
|
This method is a hack to convert a node revision item into a node
|