Duplicated get_policy_target() method across code
Bug #1317238 reported by
Lin Hua Cheng
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Wishlist
|
Sam Betts |
Bug Description
This chunk of code is copied all over the place:
def get_policy_
project_id = None
if datum:
project_id = getattr(datum, 'tenant_id', None)
return {"project_id": project_id}
(Though sometimes with a different key in the return dict.)
Would it make more sense to create a mixin or update a super-class somewhere?
Changed in horizon: | |
assignee: | nobody → Sam Betts (sambetts) |
Changed in horizon: | |
status: | Triaged → In Progress |
Changed in horizon: | |
assignee: | Sam Betts (sambetts) → Akihiro Motoki (amotoki) |
Changed in horizon: | |
assignee: | Akihiro Motoki (amotoki) → Sam Betts (sambetts) |
Changed in horizon: | |
assignee: | Sam Betts (sambetts) → Akihiro Motoki (amotoki) |
Changed in horizon: | |
assignee: | Akihiro Motoki (amotoki) → Sam Betts (sambetts) |
milestone: | none → juno-rc1 |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | juno-rc1 → 2014.2 |
To post a comment you must log in.
+1. Sounds like a good idea to me.