mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Merge pull request #3066 from ryanpetrello/frosted-flakes-are-more-than-good
clean up some minor linting issues
This commit is contained in:
commit
1becd4c39d
@ -498,7 +498,7 @@ def copy_m2m_relationships(obj1, obj2, fields, kwargs=None):
|
||||
if isinstance(override_field_val, (set, list, QuerySet)):
|
||||
getattr(obj2, field_name).add(*override_field_val)
|
||||
continue
|
||||
if override_field_val.__class__.__name__ is 'ManyRelatedManager':
|
||||
if override_field_val.__class__.__name__ == 'ManyRelatedManager':
|
||||
src_field_value = override_field_val
|
||||
dest_field = getattr(obj2, field_name)
|
||||
dest_field.add(*list(src_field_value.all().values_list('id', flat=True)))
|
||||
|
@ -54,7 +54,7 @@ class MemGroup(MemObject):
|
||||
return '<_in-memory-group_ `{}`>'.format(self.name)
|
||||
|
||||
def add_child_group(self, group):
|
||||
assert group.name is not 'all', 'group name is all'
|
||||
assert group.name != 'all', 'group name is all'
|
||||
assert isinstance(group, MemGroup), 'not MemGroup instance'
|
||||
logger.debug('Adding child group %s to parent %s', group.name, self.name)
|
||||
if group not in self.children:
|
||||
|
Loading…
Reference in New Issue
Block a user