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

Use Django's default methods to validate data on Media's fields #244

Open
bruvellu opened this issue Nov 2, 2023 · 0 comments
Open

Use Django's default methods to validate data on Media's fields #244

bruvellu opened this issue Nov 2, 2023 · 0 comments
Labels
improvement Issues with improvements for existing features

Comments

@bruvellu
Copy link
Owner

bruvellu commented Nov 2, 2023

Django has built-in methods for validating the data of a model, like the handy Model.clean_fields(). We should use these to check if the metadata of 'Media' are being filled correctly.

See https://docs.djangoproject.com/en/dev/ref/models/instances/#validating-objects

Once this is implemented, we probably don't need the metadata_error field, for example:

metadata_error = models.BooleanField(verbose_name=_('Erro nos metadados'), default=False)

@bruvellu bruvellu added the improvement Issues with improvements for existing features label Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Issues with improvements for existing features
Projects
None yet
Development

No branches or pull requests

1 participant