serialize the location id as id in url body#14273
Merged
valentijnscholten merged 1 commit intoDefectDojo:bugfixfrom Feb 10, 2026
Merged
serialize the location id as id in url body#14273valentijnscholten merged 1 commit intoDefectDojo:bugfixfrom
valentijnscholten merged 1 commit intoDefectDojo:bugfixfrom
Conversation
Maffooch
approved these changes
Feb 10, 2026
Jino-T
approved these changes
Feb 10, 2026
paulOsinski
approved these changes
Feb 10, 2026
Member
…ctedlocationserializer, exclude hash field in urlserializer
1549575 to
b5a960b
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates AbstractedLocationSerializer to return the the ID of the Location object rather than the object itself (e.g., the URL).
URLs have a 1-1 with Location; the ID of the Location is used when accessing individual URLs via the API (
/url) to keep consistency with the quick-lookup/locationAPI endpoint. However, the body of the/urlendpoint returns the ID of the URL object itself in the.idattribute, and the ID of the Location object in a.locationfield. This is a little weird (sorry!), since we never use the URL's ID anywhere else from a user's perspective and I'm sure it'll give someone an unnecessary headache down the road.Thus, this PR updates the AbstractedLocationSerializer to return the Location's ID under the
.idattribute; similarly, URLSerializer is updated to exclude the.locationattribute as it's now redundant. At the same time, I've excluded the.hashfield; it's used internally for uniqueness checks, there's no real reason to return it at this time.