Librarian in regular requirements.
[redakcja.git] / apps / catalogue / management / commands / assign_from_redmine.py
old mode 100755 (executable)
new mode 100644 (file)
index 9f7b12d..491fd83
@@ -12,7 +12,7 @@ from django.core.management.base import BaseCommand
 from django.core.management.color import color_style
 from django.db import transaction
 
-from slughifi import slughifi
+from slugify import slugify
 from catalogue.models import Chunk
 
 
@@ -47,9 +47,7 @@ class Command(BaseCommand):
             redmine_csv = REDMINE_CSV
 
         # Start transaction management.
-        transaction.commit_unless_managed()
         transaction.enter_transaction_management()
-        transaction.managed(True)
 
         redakcja_link = re.compile(re.escape(redakcja) + r'([-_.:?&%/a-zA-Z0-9]*)')
 
@@ -91,7 +89,7 @@ class Command(BaseCommand):
                 if fname.endswith('.xml'):
                     fname = fname[:-4]
                 fname = fname.replace(' ', '_')
-                fname = slughifi(fname)
+                fname = slugify(fname)
 
                 chunks = Chunk.objects.filter(book__slug=fname)
                 if not chunks: