Skip to content

Commit

Permalink
fix when data is not a flow
Browse files Browse the repository at this point in the history
  • Loading branch information
noO0oOo0ob committed Nov 29, 2023
1 parent 19f8f9c commit a0f2571
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion frontend/src/views/datamanager/DataDetailHttpData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,13 @@ export default {
Object.assign(newReq, JSON.parse(this.editorCache.req))
newReq['data'] = this.editorCache.reqData
newData['request'] = newReq
newData['request']['headers']['lyrebirdInternalFlow'] = 'datamanager'
// Add response
const newResp = {}
Object.assign(newResp, JSON.parse(this.editorCache.resp))
newResp['data'] = this.editorCache.respData
newData['response'] = newResp
// Add Flag
newData['lyrebirdInternalFlow'] = 'datamanager'
this.$store.commit('setIsReloadTreeWhenUpdate', this.dataDetail.name !== newData.name)
Expand Down
4 changes: 2 additions & 2 deletions lyrebird/mock/blueprints/apis/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def put(self):
data = request.json
# Import encoder for encoding the requested content
application.encoders_decoders.encoder_handler(data)
if 'lyrebirdInternalFlow' in data['request']['headers']:
del data['request']['headers']['lyrebirdInternalFlow']
if 'lyrebirdInternalFlow' in data:
del data['lyrebirdInternalFlow']
context.application.data_manager.update_data(data_id, data)
context.application.data_manager.reactive()
return context.make_ok_response()
Expand Down

0 comments on commit a0f2571

Please sign in to comment.