Skip to content

Commit

Permalink
Disable SoftwarePlan.get_version cache in tests
Browse files Browse the repository at this point in the history
A stab in the dark to fix TasksTest class cleanup failing during domain deletion with:
corehq.apps.accounting.models.FeatureRate.DoesNotExist: FeatureRate matching query does not exist.

Failure occurs when attempting to delete the "test" domain, but not "mirror".
  • Loading branch information
millerdev committed Sep 3, 2024
1 parent 0a21f6e commit 13ba100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corehq/apps/accounting/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ class SoftwarePlan(models.Model):
class Meta(object):
app_label = 'accounting'

@quickcache(vary_on=['self.pk'], timeout=10)
@quickcache(vary_on=['self.pk'], timeout=10, skip_arg=lambda *a, **k: settings.UNIT_TESTING)
def get_version(self):
try:
return self.softwareplanversion_set.filter(is_active=True).latest('date_created')
Expand Down

0 comments on commit 13ba100

Please sign in to comment.