]> git.parisson.com Git - teleforma.git/commitdiff
fix rel.to
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Dec 2013 17:26:21 +0000 (18:26 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 19 Dec 2013 17:26:21 +0000 (18:26 +0100)
teleforma/management/commands/teleforma-copy-seminars.py

index 155286d6a421d85ef7bcf39a9871f8c83da936e8..8781260bf029fb5b4cc6075e858251402718a704 100644 (file)
@@ -37,8 +37,7 @@ class Command(BaseCommand):
                     print ('dates updated', clone)
 
                     for field in seminar._meta.many_to_many:
-                        print type(field.rel.to)
-                        if type(field.rel.to) == Document or type(field.rel.to) == Media:
+                        if field.rel.to == Document or field.rel.to == Media:
                             source = getattr(seminar, field.attname)
                             destination = getattr(clone, field.attname)
                             print source, destination