Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jill/linting
Browse files Browse the repository at this point in the history
pomegranited committed Oct 9, 2023
2 parents 95c0e5a + 909e3f8 commit 0ff6249
Showing 24 changed files with 428 additions and 1,687 deletions.
2 changes: 1 addition & 1 deletion openedx_learning/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""
Open edX Learning ("Learning Core").
"""
__version__ = "0.2.0"
__version__ = "0.2.1"
2 changes: 1 addition & 1 deletion openedx_learning/core/publishing/api.py
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@ def create_publishable_entity_version(
version_num=version_num,
title=title,
created=created,
created_by=created_by,
created_by_id=created_by,
)
Draft.objects.create(
entity_id=entity_id,
9 changes: 1 addition & 8 deletions openedx_tagging/core/tagging/api.py
Original file line number Diff line number Diff line change
@@ -26,8 +26,7 @@ def create_taxonomy(
name: str,
description: str | None = None,
enabled=True,
required=False,
allow_multiple=False,
allow_multiple=True,
allow_free_text=False,
taxonomy_class: type[Taxonomy] | None = None,
) -> Taxonomy:
@@ -38,7 +37,6 @@ def create_taxonomy(
name=name,
description=description or "",
enabled=enabled,
required=required,
allow_multiple=allow_multiple,
allow_free_text=allow_free_text,
)
@@ -213,11 +211,6 @@ def _check_new_tag_count(new_tag_count: int) -> None:
if not taxonomy.allow_multiple and len(tags) > 1:
raise ValueError(_("Taxonomy ({name}) only allows one tag per object.").format(name=taxonomy.name))

if taxonomy.required and len(tags) == 0:
raise ValueError(
_("Taxonomy ({id}) requires at least one tag per object.").format(id=taxonomy.id)
)

current_tags = list(
ObjectTagClass.objects.filter(taxonomy=taxonomy, object_id=object_id)
)
Loading

0 comments on commit 0ff6249

Please sign in to comment.