Skip to content

Commit 25a0014

Browse files
Fix return type to prevent promise error (alfredfrancis#98)
1 parent 3d3e2ba commit 25a0014

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/entities/controllers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def update_entity(id):
6666
entity = Entity.objects.get(id=ObjectId(id))
6767
entity = update_document(entity, json_data)
6868
entity.save()
69-
return 'success', 200
69+
return build_response.sent_ok()
7070

7171

7272
@entities_blueprint.route('/<id>', methods=['DELETE'])

frontend/src/app/agent/entity/entity.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export class EntityComponent implements OnInit {
5555
}
5656
saveEntity(){
5757
this.entitiesService.saveEntity(this.entity).then(
58-
(result)=>{
59-
console.log(result);
58+
(result:any)=>{
59+
console.log("Success: " + JSON.stringify(result));
6060
}
6161
)
6262
}

0 commit comments

Comments
 (0)