total_count in the get artifacts api doesnot return the count of artifacts in all the realms even when the admin token is specified

Bug #2025122 reported by swathi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glare
New
Undecided
Unassigned

Bug Description

get artifacts glare api with admin token returns all the artifacts in all the realm, whereas the total_count is still the number of artifacts in specific realm.

(get_all call in sqlalchemy/api.py takes "list_all_artifacts" flag, which indicates if the list should return list from all realms/specific realm. This flag is considered when fetching the artifacts, but is not considered when fetching the count of artifacts.

//Existing code in sqlalchemy/api.py:
artifacts = _get_all(
        context, session, filters, marker,
        limit, sort, latest, list_all_artifacts)
total_artifacts_count = get_artifact_count(context, session, filters,
                                               latest)

//Code with fix in sqlalchemy/api.py:
artifacts = _get_all(
        context, session, filters, marker,
        limit, sort, latest, list_all_artifacts)
total_artifacts_count = get_artifact_count(context, session, filters,
                                               latest, list_all_artifacts)

Revision history for this message
swathi (rswat) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.