mirror of
https://github.com/solero/houdini.git
synced 2024-11-25 15:07:24 +00:00
Return 0 for penguin string attribute if attribute is None
This commit is contained in:
parent
c5d2b6e03b
commit
094ee97f4d
@ -44,13 +44,13 @@ class PenguinStringCompiler(OrderedDict):
|
||||
@classmethod
|
||||
def attribute_by_name(cls, attribute_name):
|
||||
async def attribute_method(p):
|
||||
return getattr(p, attribute_name)
|
||||
return getattr(p, attribute_name) or 0
|
||||
return attribute_method
|
||||
|
||||
@classmethod
|
||||
def data_attribute_by_name(cls, attribute_name):
|
||||
async def attribute_method(p):
|
||||
return getattr(p.data, attribute_name)
|
||||
return getattr(p.data, attribute_name) or 0
|
||||
return attribute_method
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user