Compare commits
1 Commits
master
...
none-commu
Author | SHA1 | Date |
---|---|---|
Ilya Etingof | 3c16a9a8a1 |
|
@ -32,6 +32,9 @@ class CommunityData(object):
|
|||
|
||||
def __init__(self, communityName, mpModel=1):
|
||||
self.mpModel = mpModel
|
||||
# Treat `None` as an empty string
|
||||
if communityName is None:
|
||||
communityName = ''
|
||||
self.communityName = communityName
|
||||
|
||||
def __hash__(self):
|
||||
|
|
|
@ -107,6 +107,9 @@ class CommunityData(object):
|
|||
self.contextName = contextName
|
||||
if tag is not None:
|
||||
self.tag = tag
|
||||
# Treat `None` as an empty string
|
||||
if communityIndex is None:
|
||||
communityIndex = ''
|
||||
# a single arg is considered as a community name
|
||||
if communityName is None:
|
||||
communityName, communityIndex = communityIndex, None
|
||||
|
|
Loading…
Reference in New Issue