fix: update application handling in upload_application_file method across multiple nodes - #6537
Conversation
…ross multiple nodes
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
There was a problem hiding this comment.
🟡 Not ready to approve
There is at least one remaining workflow node call site still using chat_info.application.id, so the PR’s stated fix is incomplete and the original None-dereference risk can persist.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR updates workflow step nodes’ upload_application_file logic to use chat_info.application_id instead of dereferencing chat_info.application.id, aligning with how ChatInfo stores application identity and avoiding failures when application hasn’t been loaded.
Changes:
- Switched
upload_application_fileto readapplication_iddirectly fromchat_infoin multiple step nodes. - Updated
meta['debug']andmeta['application_id']derivation to be based onapplication_idpresence rather thanapplication.id.
File summaries
| File | Description |
|---|---|
| apps/application/flow/step_node/text_to_video_step_node/impl/base_text_to_video_node.py | Uses chat_info.application_id for application file uploads to avoid dereferencing application. |
| apps/application/flow/step_node/text_to_speech_step_node/impl/base_text_to_speech_node.py | Same application_id-based upload metadata update for TTS node. |
| apps/application/flow/step_node/image_to_video_step_node/impl/base_image_to_video_node.py | Same application_id-based upload metadata update for image-to-video node. |
| apps/application/flow/step_node/image_generate_step_node/impl/base_image_generate_node.py | Same application_id-based upload metadata update for image-generation node. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 1
- Review effort level: Low
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| def upload_application_file(self, file): | ||
| application = self.workflow_manage.work_flow_post_handler.chat_info.application | ||
| application_id = self.workflow_manage.work_flow_post_handler.chat_info.application_id | ||
| chat_id = self.workflow_params.get('chat_id') | ||
| meta = { | ||
| 'debug': False if application.id else True, | ||
| 'debug': False if application_id else True, | ||
| 'chat_id': chat_id, | ||
| 'application_id': str(application.id) if application.id else None, | ||
| 'application_id': str(application_id) if application_id else None, | ||
| } |
fix: update application handling in upload_application_file method across multiple nodes