Commit 4ae4cf08 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_ecoallocation: Make pylint happy

parent 057f0ec3
Pipeline #10804 failed with stage
in 0 seconds
from zExceptions import Unauthorized from zExceptions import Unauthorized
if REQUEST is not None: if REQUEST is not None:
pass #raise Unauthorized raise Unauthorized
document = context document = context
portal = document.getPortalObject() portal = document.getPortalObject()
......
import random import random
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery
person = context
computer_partition = None computer_partition = None
query_kw = { query_kw = {
...@@ -19,14 +18,13 @@ else: ...@@ -19,14 +18,13 @@ else:
# support SLA # support SLA
# Explicit location # Explicit location
explicit_location = False #explicit_location = False
if "computer_guid" in filter_kw: if "computer_guid" in filter_kw:
explicit_location = True #explicit_location = True
query_kw["parent_reference"] = SimpleQuery(parent_reference=filter_kw.pop("computer_guid")) query_kw["parent_reference"] = SimpleQuery(parent_reference=filter_kw.pop("computer_guid"))
if "instance_guid" in filter_kw: if "instance_guid" in filter_kw:
explicit_location = True #explicit_location = True
portal = context.getPortalObject()
instance_guid = filter_kw.pop("instance_guid") instance_guid = filter_kw.pop("instance_guid")
query_kw["aggregate_related_reference"] = SimpleQuery(aggregate_related_reference=instance_guid) query_kw["aggregate_related_reference"] = SimpleQuery(aggregate_related_reference=instance_guid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment