File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ def test_view_brochure_view_with_wrong_signature_fails(client):
3333
3434def test_view_brochure_view (client ):
3535 sponsor_lead = SponsorLeadFactory (brochure_viewed = False , conference__code = "code" )
36+
37+ other_brochure = DocumentFactory ()
38+ other_brochure .tags .add ("sponsorship-brochure" , "other-code" )
39+
3640 brochure = DocumentFactory ()
3741 brochure .tags .add ("sponsorship-brochure" , sponsor_lead .conference .code )
3842
Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ def view_brochure(request, sponsor_lead_id):
1212 sponsor_lead .save (update_fields = ["brochure_viewed" ])
1313
1414 Document = get_document_model ()
15- brochure = Document .objects .filter (
16- tags__name__in = ["sponsorship-brochure" , sponsor_lead .conference .code ],
17- ).first ()
15+ brochure = (
16+ Document .objects .filter (tags__name = "sponsorship-brochure" )
17+ .filter (tags__name = sponsor_lead .conference .code )
18+ .first ()
19+ )
1820
1921 return redirect (brochure .url , permanent = False )
You can’t perform that action at this time.
0 commit comments