[PR #24357] Fix missing database commit in provider update handler #30592

Closed
opened 2026-02-21 20:47:50 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24357

State: closed
Merged: Yes


Summary

  • Adds missing session.commit() call in the provider update handler
  • Ensures provider quota deductions are properly persisted to the database
  • Fixes issue where quota updates were prepared but lost when session ended

Related Issue

Fixes #24356

Testing

  • Verified that provider quota updates are now committed to the database
  • Tested message creation flow to ensure quotas are correctly deducted
  • Confirmed no regression in existing provider update functionality

Changes

  • Added session.commit() after provider updates in _execute_provider_updates() function
**Original Pull Request:** https://github.com/langgenius/dify/pull/24357 **State:** closed **Merged:** Yes --- ## Summary - Adds missing `session.commit()` call in the provider update handler - Ensures provider quota deductions are properly persisted to the database - Fixes issue where quota updates were prepared but lost when session ended ## Related Issue Fixes #24356 ## Testing - Verified that provider quota updates are now committed to the database - Tested message creation flow to ensure quotas are correctly deducted - Confirmed no regression in existing provider update functionality ## Changes - Added `session.commit()` after provider updates in `_execute_provider_updates()` function
yindo added the pull-request label 2026-02-21 20:47:50 -05:00
yindo closed this issue 2026-02-21 20:47:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30592