Skip to content

Commit

Permalink
Update to ensure scale up also get all version history
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewelwell committed Oct 29, 2024
1 parent c039942 commit 37313c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ def update_limits(apps: Apps, schema_editor: BaseDatabaseSchemaEditor) -> None:
if osic is None:
continue

if subscription_family == SubscriptionPlanFamily.SCALE_UP:
osic.audit_log_visibility_days = None
osic.feature_history_visibility_days = 14
elif subscription_family == SubscriptionPlanFamily.ENTERPRISE:
if subscription_family in (SubscriptionPlanFamily.SCALE_UP, SubscriptionPlanFamily.ENTERPRISE):
osic.audit_log_visibility_days = None
osic.feature_history_visibility_days = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def test_update_audit_and_history_limits(migrator: Migrator) -> None:
organisation_id=scale_up_organisation.id,
)
assert migrated_scale_up_osic.audit_log_visibility_days is None
assert migrated_scale_up_osic.feature_history_visibility_days == 14
assert migrated_scale_up_osic.feature_history_visibility_days is None

migrated_enterprise_osic = NewOrganisationSubscriptionInformationCache.objects.get(
organisation_id=enterprise_organisation.id,
Expand Down

0 comments on commit 37313c3

Please sign in to comment.