feat: exclude archived projects from dashboard and query results
Add is_archived == False filter to all project queries so archived cases are hidden from users.
This commit is contained in:
@@ -73,13 +73,13 @@ def query_projects_for_user(
|
||||
domain_lower = filter_domain.lower()
|
||||
projects_ref = db.collection("projects").where(
|
||||
"viewing_domains", "array_contains", domain_lower
|
||||
)
|
||||
).where("is_archived", "==", False)
|
||||
else:
|
||||
# Email-based search
|
||||
email_lower = filter_email.lower()
|
||||
projects_ref = db.collection("projects").where(
|
||||
"viewing_emails", "array_contains", email_lower
|
||||
)
|
||||
).where("is_archived", "==", False)
|
||||
|
||||
# Get total count
|
||||
total_count = int(projects_ref.count().get()[0][0].value)
|
||||
|
||||
Reference in New Issue
Block a user