Skip to content

Commit

Permalink
Do not filter leases by offer if no offer_uuid is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
tzumainn committed Oct 22, 2024
1 parent 9436150 commit e9078af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion esi_leap/api/controllers/v1/lease.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,16 @@ def _lease_get_all_authorize_filters(

filters = {
"status": status,
"offer_uuid": offer_uuid,
"start_time": start_time,
"end_time": end_time,
"resource_type": resource_type,
"resource_uuid": resource_uuid,
"time_filter_type": constants.WITHIN_TIME_FILTER,
}

if offer_uuid is not None:
filters["offer_uuid"] = offer_uuid

if view == "all":
utils.policy_authorize("esi_leap:lease:lease_admin", cdict, cdict)
filters["owner_id"] = owner_id
Expand Down

0 comments on commit e9078af

Please sign in to comment.