You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some refactoring in validators. Some of them are not used anymore or
they do check for the existence of the DB by fetching the record, which
is inefficient. DRF validators are expected to raise `ValidationError`
or return None. In case of the `organization_id` has been created a
mixin to avoid code duplication.
Refactored:
- organization
- rulebook
- credential_type
- awx_token
Removed:
- event_streams
- extra_vars
Technically, in most of the cases a PrimaryKey field would be better,
but that would require a more extended refactor to keep 100% backward
compatibility, since we would have to implement custom error messages
among other changes. There are multiple fields candidate to be a
PrimaryKeyField and such a conversion is not the scope of this PR.
Here I only address the fields where we are duplicating DB queries,
duplicating field definition and removing unused validators.
Signed-off-by: Alex <[email protected]>
0 commit comments