# HG changeset patch # User durandn # Date 1446042050 -3600 # Node ID 52ccdf3955acf97fbd6c0a13f1bc3a10d4fd87ea # Parent e6d31ba94ad0b6a24d7c5243219511e67ef8c83f Fixed AnnotationObject init typo diff -r e6d31ba94ad0 -r 52ccdf3955ac src/ldt/ldt/api/ldt/resources/annotation.py --- a/src/ldt/ldt/api/ldt/resources/annotation.py Mon Oct 19 09:55:08 2015 +0200 +++ b/src/ldt/ldt/api/ldt/resources/annotation.py Wed Oct 28 15:20:50 2015 +0100 @@ -21,9 +21,9 @@ self.media = media self.begin = begin self.end = end - self.content = content if content is None else {"title":"", "description":""} - self.tags = tags if tags is None else [] - self.meta = meta if meta is None else {"creator":"", "created":""} + self.content = content if content is not None else {"title":"", "description":""} + self.tags = tags if tags is not None else [] + self.meta = meta if meta is not None else {"creator":"", "created":""} class AnnotationResource(Resource): # For the moment, these attributes are useless. We just prepare relations to AnnotationObject @@ -187,6 +187,7 @@ finally: protect_models() # We update the AnnotationObject for the returned datas to be correct. + print(data_dict) bundle.obj = AnnotationObject( id=data_dict["ann_id"], project=data_dict["project_id"], @@ -200,6 +201,8 @@ tags=data_dict['ann_tags'], meta=data_dict['ann_meta'] ) + print(data_dict["ann_content"]) + print(bundle.obj.content) return bundle def obj_update(self, bundle, **kwargs):