Created
April 20, 2011 17:06
-
-
Save ChristinaMeno/931960 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
what_i_want = dict( | |
name = performer.name, | |
slug = slug, | |
sound_description = performer.short_bio, | |
history = performer.long_bio, | |
eventful_id = performer.id, | |
primary_category_id = PERFORMER_CATEGORY, | |
website = website, | |
) | |
updated = self.force_update | |
band = None | |
try: | |
band = MedleyBand.objects.get(**what_i_want) | |
except MedleyBand.DoesNotExist: | |
band = MedleyBand.objects.get_or_create(eventful_id= performer.id) | |
band.update(**what_i_want) | |
updated = True | |
if updated or self.force_update: | |
band.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment