Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jan 11, 2023
1 parent 9d8b0c3 commit f23892b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/concepts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def is_existing_in_parent(self):
return self.parent.concepts_set.filter(mnemonic__exact=self.mnemonic).exists()

@classmethod
def persist_new(cls, data, user=None, create_initial_version=True, create_parent_version=True): # pylint: disable=too-many-statements
def persist_new(cls, data, user=None, create_initial_version=True, create_parent_version=True): # pylint: disable=too-many-statements,too-many-branches
names = data.pop('names', []) or []
descriptions = data.pop('descriptions', []) or []
parent_concept_uris = data.pop('parent_concept_urls', None)
Expand Down
3 changes: 2 additions & 1 deletion core/concepts/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,8 @@ def test_clone(self):
es_locale_description = ConceptDescriptionFactory.build(locale='es', name='Not English')
en_locale_description = ConceptDescriptionFactory.build(locale='en', name='English')

concept = ConceptFactory(descriptions=(es_locale_description, en_locale_description), names=(en_locale,), released=True)
concept = ConceptFactory(
descriptions=(es_locale_description, en_locale_description), names=(en_locale,), released=True)
cloned_concept = concept.clone()

self.assertTrue(cloned_concept.version.startswith('--TEMP--'))
Expand Down

0 comments on commit f23892b

Please sign in to comment.