Skip to content

feat: downgrade subscription when its expired#125

Merged
lethanhdat762003 merged 5 commits into
devfrom
feat/downgrading-subscription
Jul 16, 2026
Merged

feat: downgrade subscription when its expired#125
lethanhdat762003 merged 5 commits into
devfrom
feat/downgrading-subscription

Conversation

@lethanhdat762003

Copy link
Copy Markdown
Member

What?

Why?

How?

Testing?

  • Functional Testing
  • Security
  • Performance
  • Error Handling
  • Code Quality
  • Documentation
  • Database
  • Deployment
  • Final Review

Anything Else?

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces device deactivation logic for downgraded organizations and integrates quota enforcement for bulk device creation. Feedback highlights a critical Django runtime error in the deactivation logic where .update() is called on a sliced queryset, along with a performance issue from using len() instead of .count(). Additionally, a potential quota leak was identified in the bulk creation endpoint because quota is reserved before validating the input data, which can result in unreleased quota for failed devices.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread apps/device/consumers.py Outdated
Comment thread apps/device/views.py Outdated
@lethanhdat762003
lethanhdat762003 force-pushed the feat/downgrading-subscription branch from 15c2ee5 to 02c5f42 Compare July 16, 2026 02:48
@lethanhdat762003
lethanhdat762003 merged commit f9b9155 into dev Jul 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants