-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add models to associate an opportunity id with a subscription license #523
feat: add models to associate an opportunity id with a subscription license #523
Conversation
65b6ca6
to
399420e
Compare
399420e
to
c5416bf
Compare
c5416bf
to
67eca35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor suggestion.
return "SubscriptionLicenseSourceType: Name: {name}, Slug: {slug}".format(name=self.name, slug=self.slug) | ||
|
||
|
||
class SubscriptionLicenseSource(TimeStampedModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestion: you might want HistoricalRecords
on this model.
related_name='source', | ||
on_delete=models.CASCADE, | ||
) | ||
source_id = models.CharField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we should align the naming of these fields to what we use in subsidy: https://github.com/openedx/enterprise-subsidy/blob/main/enterprise_subsidy/apps/subsidy/models.py#L156-L176
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Playing devil's advocate a bit, having source_
in these names may make sense here given the model names both include Source
(i.e., SubscriptionLicenseSource
and SubscriptionLicenseSourceType
)?
related_name='source', | ||
on_delete=models.CASCADE, | ||
) | ||
source_id = models.CharField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Playing devil's advocate a bit, having source_
in these names may make sense here given the model names both include Source
(i.e., SubscriptionLicenseSource
and SubscriptionLicenseSourceType
)?
67eca35
to
d7d0714
Compare
55119e2
to
f9367ed
Compare
Description
Add models to capture source of license assignment.
Link to the associated ticket: https://2u-internal.atlassian.net/browse/ENT-7641
Testing considerations
already been performed.
Post-review
Squash commits into discrete sets of changes