def forwards(self, orm):
        from sentry.constants import RESERVED_TEAM_SLUGS
        from sentry.models import slugify_instance

        for team in orm['sentry.Team'].objects.filter(slug__isnull=True):
            slugify_instance(team, team.name, reserved=RESERVED_TEAM_SLUGS)
            team.save()
    def forwards(self, orm):
        from sentry.models import slugify_instance

        for team in orm['sentry.Team'].objects.filter(models.Q(slug='') | models.Q(slug__isnull=True)):
            slugify_instance(team, team.name)
            team.save()

        for project in orm['sentry.Project'].objects.filter(models.Q(slug='') | models.Q(slug__isnull=True)):
            slugify_instance(project, project.name)
            project.save()
    def forwards(self, orm):
        from sentry.constants import RESERVED_TEAM_SLUGS
        from sentry.models import slugify_instance

        for team in orm["sentry.Team"].objects.filter(models.Q(slug="") | models.Q(slug__isnull=True)):
            slugify_instance(team, team.name, reserved=RESERVED_TEAM_SLUGS)
            team.save()

        for project in orm["sentry.Project"].objects.filter(models.Q(slug="") | models.Q(slug__isnull=True)):
            slugify_instance(project, project.name, reserved=RESERVED_TEAM_SLUGS)
            project.save()
Esempio n. 4
0
    def forwards(self, orm):
        from sentry.models import slugify_instance

        for team in orm['sentry.Team'].objects.filter(
                models.Q(slug='') | models.Q(slug__isnull=True)):
            slugify_instance(team, team.name)
            team.save()

        for project in orm['sentry.Project'].objects.filter(
                models.Q(slug='') | models.Q(slug__isnull=True)):
            slugify_instance(project, project.name)
            project.save()
Esempio n. 5
0
    def forwards(self, orm):
        from sentry.models import slugify_instance
        try:
            superuser = orm['sentry.User'].objects.filter(is_superuser=True)[0]
        except IndexError:
            return

        for project in orm['sentry.Project'].objects.filter(team__isnull=True):
            if not project.owner:
                project.owner = superuser
            project.team = orm['sentry.Team'](
                name=project.name,
                owner=project.owner,
            )
            slugify_instance(project.team, project.team.name)
            project.team.save()
            project.save()
Esempio n. 6
0
    def forwards(self, orm):
        from sentry.models import slugify_instance
        try:
            superuser = orm['sentry.User'].objects.filter(is_superuser=True)[0]
        except IndexError:
            return

        for project in orm['sentry.Project'].objects.filter(team__isnull=True):
            if not project.owner:
                project.owner = superuser
            project.team = orm['sentry.Team'](
                name=project.name,
                owner=project.owner,
            )
            slugify_instance(project.team, project.team.name)
            project.team.save()
            project.save()
Esempio n. 7
0
    def forwards(self, orm):
        from sentry.models import slugify_instance

        for team in orm['sentry.Team'].objects.filter(slug__isnull=True):
            slugify_instance(team, team.name)
            team.save()
    def forwards(self, orm):
        from sentry.models import slugify_instance

        for team in orm['sentry.Team'].objects.filter(slug__isnull=True):
            slugify_instance(team, team.name)
            team.save()