Skip to content

Commit

Permalink
Merge pull request #813 from upconsulting/develop
Browse files Browse the repository at this point in the history
Fix tenant search issue for non-portal pages.
  • Loading branch information
jdamerow committed Feb 29, 2024
2 parents 0b234d7 + 5415025 commit c8364df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion isiscb/isisdata/views.py
Expand Up @@ -1272,7 +1272,10 @@ def home(request, template='isisdata/home.html', tenant_id=None):
sqs.query.set_limits(low=0, high=30)
# featured_citations = sqs.all().exclude(public="false").filter(abstract = Raw("[* TO *]")).filter(title = Raw("[* TO *]")).query.get_results()
featured_citations = sqs.all().exclude(public="false")
featured_citations = featured_citations.filter(subject_ids__in=current_featured_authority_ids, owning_tenant=tenant.id).filter(type__in=['Book', 'Article']).filter(abstract = Raw("[* TO *]")).filter(title = Raw("[* TO *]")).query.get_results()
if tenant:
featured_citations = featured_citations.filter(subject_ids__in=current_featured_authority_ids, owning_tenant=tenant.id).filter(type__in=['Book', 'Article']).filter(abstract = Raw("[* TO *]")).filter(title = Raw("[* TO *]")).query.get_results()
else:
featured_citations = featured_citations.filter(subject_ids__in=current_featured_authority_ids).filter(type__in=['Book', 'Article']).filter(abstract = Raw("[* TO *]")).filter(title = Raw("[* TO *]")).query.get_results()

if featured_citations:
featured_citation = featured_citations[random.randint(0,len(featured_citations)-1)]
Expand Down

0 comments on commit c8364df

Please sign in to comment.