mirror of
https://github.com/solero/houdini.git
synced 2025-08-08 11:44:05 +00:00
Return 0 for penguin string attribute if attribute is None
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user