-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: editable desired_num_licenses, license-creation on plans as action
Creates a simple django admin action to make the actual license count equal the desired license count via SubscriptionPlanAdmin. The logic to create actual licenses via subscription plan admin now takes the presence of last_freeze_timestamp into account. No longer try to rectify desired-vs-actual on save of subscription plans via admin. Makes desired_num_license editable via admin, so that our EstimatedCountLicensePagintion doesn't completely lie when we manually remove licenses from a plan. ENT-8905
- Loading branch information
1 parent
679fd53
commit 720e561
Showing
4 changed files
with
93 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
license_manager/apps/subscriptions/migrations/0067_editable_desired_num_licenses.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.2.9 on 2024-05-08 14:27 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('subscriptions', '0066_license_subscription_plan_status_idx'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='historicalsubscriptionplan', | ||
name='desired_num_licenses', | ||
field=models.PositiveIntegerField(blank=True, help_text='Total number of licenses that should exist for this SubscriptionPlan. The total license count (provisioned asynchronously) will reach the desired amount eventually. Empty (NULL) means no attempts will be made to asynchronously provision licenses.', null=True, verbose_name='Desired Number of Licenses'), | ||
), | ||
migrations.AlterField( | ||
model_name='subscriptionplan', | ||
name='desired_num_licenses', | ||
field=models.PositiveIntegerField(blank=True, help_text='Total number of licenses that should exist for this SubscriptionPlan. The total license count (provisioned asynchronously) will reach the desired amount eventually. Empty (NULL) means no attempts will be made to asynchronously provision licenses.', null=True, verbose_name='Desired Number of Licenses'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters