Created
March 18, 2010 17:26
-
-
Save callen23dc/336601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process_bimport(sender, **kwargs): | |
from bimport.models import Bimport | |
import ipdb; ipdb.set_trace() | |
if sender == (Bimport): | |
inst = kwargs['instance'] | |
if not inst._processing: | |
inst.status = 'P' | |
inst._processing = True | |
inst.save() | |
if int(inst.content_type.id) == 116: | |
import_subs(inst) | |
else: | |
inst.status = 'E' | |
inst.error = "Content type unrecognized, don't know what to do with this bulk import." | |
inst.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment