Skip to content
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

Fix: incorrect type for output_field argument of generate_series function #12

Merged

Conversation

tui95
Copy link
Contributor

@tui95 tui95 commented May 26, 2022

Explanation

output_field argument of generate_series function should be a child class of models.Field. It is used in django_generate_series.models._make_model_class function to validate whether the output_field is of supported fields, where issubclass is used for checking. https://github.com/jacklinke/django-generate-series/blob/ae419b9d761b93b59632269dc54252c135ea3fb9/django_generate_series/models.py#L407

However, the first argument of issubclass must be a class, not an instance. Therefore, the typing is incorrect here.

@jacklinke jacklinke merged commit deb1ec9 into OmenApps:main May 27, 2022
@jacklinke
Copy link
Member

Thank you for the catch!

@tui95 tui95 deleted the fix/generate-series-output-field-typing branch May 27, 2022 02:42
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