Changes between Initial Version and Version 1 of Ticket #31535
- Timestamp:
- May 4, 2020, 9:45:21 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #31535 – Description
initial v1 5 5 SELECT "bug_challenge"."id", "bug_challenge"."name", CASE WHEN "bug_challenge_unlocks"."from_challenge_id" IN (5, 1) THEN True ELSE False END AS "unlocked" FROM "bug_challenge" LEFT OUTER JOIN "bug_challenge_unlocks" ON ("bug_challenge"."id" = "bug_challenge_unlocks"."to_challenge_id") 6 6 }}} 7 so it seems like the left outer join is adding the duplicates .7 so it seems like the left outer join is adding the duplicates although thats needed for the case statement. 8 8 9 9 It is possible to work around this by calling value_list(flat=True).distinct('pk') however isn't compatible with more complicated examples such as https://github.com/ractf/core/blob/master/challenge/views.py#L50