def create_team_delete_log(entry): delete_log = DeletedTeam() team = Team.objects.get(id=entry.target_object) delete_log.name = team.name delete_log.slug = team.slug delete_log.date_created = team.date_added delete_log.organization_id = entry.organization.id delete_log.organization_name = entry.organization.name delete_log.organization_slug = entry.organization.slug complete_delete_log(delete_log, entry)
def create_team_delete_log(entry): from sentry.models import DeletedTeam # Django 1.9 setup issue from sentry.models import Team # Django 1.9 setup issue delete_log = DeletedTeam() team = Team.objects.get(id=entry.target_object) delete_log.name = team.name delete_log.slug = team.slug delete_log.date_created = team.date_added delete_log.organization_id = entry.organization.id delete_log.organization_name = entry.organization.name delete_log.organization_slug = entry.organization.slug complete_delete_log(delete_log, entry)