Fixed Relay Connection name

This commit is contained in:
Syrus Akbary 2016-09-17 21:12:39 -07:00
parent 92b04225b2
commit 5287758f0e

View File

@ -49,7 +49,7 @@ class ConnectionMeta(ObjectTypeMeta):
options = Options( options = Options(
attrs.pop('Meta', None), attrs.pop('Meta', None),
name=None, name=name,
description=None, description=None,
node=None, node=None,
) )
@ -61,7 +61,7 @@ class ConnectionMeta(ObjectTypeMeta):
'Received incompatible node "{}" for Connection {}.' 'Received incompatible node "{}" for Connection {}.'
).format(options.node, name) ).format(options.node, name)
base_name = re.sub('Connection$', '', name) base_name = re.sub('Connection$', '', options.name) or options.node._meta.name
if not options.name: if not options.name:
options.name = '{}Connection'.format(base_name) options.name = '{}Connection'.format(base_name)