Skip to content

Commit ee3b619

Browse files
committed
Check on put comment if id
1 parent e0aaba0 commit ee3b619

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

monitor/controller.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,10 @@ def update_comment(
190190
if token != c.authToken:
191191
return falcon.HTTP_FORBIDDEN
192192

193-
fc = database.select_framecomments_for_component(
193+
fc = database.select_framecomment_for_component_and_comment(
194194
conn=conn,
195195
comp=c,
196+
comment=body.get('comment'),
196197
)
197198

198199
if fc:
@@ -202,7 +203,9 @@ def update_comment(
202203
text=body.get('comment'),
203204
comp=c,
204205
)
205-
return falcon.HTTP_NO_CONTENT
206+
return falcon.HTTP_NO_CONTENT
207+
else:
208+
return falcon.HTTP_NOT_FOUND
206209

207210

208211
def delete_comment(

0 commit comments

Comments
 (0)