Skip to content

Commit

Permalink
Add support for raven-js
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Dec 4, 2012
1 parent aea1552 commit f310cb0
Show file tree
Hide file tree
Showing 6 changed files with 847 additions and 16 deletions.
12 changes: 9 additions & 3 deletions src/sentry/migrations/0049_create_default_project_keys.py
Expand Up @@ -7,12 +7,18 @@
class Migration(DataMigration):

def forwards(self, orm):
from sentry.utils.models import update
from sentry.models import ProjectKey

for project in orm['sentry.Project'].objects.all():
orm['sentry.ProjectKey'].objects.create(
if ProjectKey.objects.filter(project=project, user=None).exists():
continue

ProjectKey.objects.create(
project=project,
user=None,
defaults=dict(
public_key=ProjectKey.generate_api_key(),
secret_key=ProjectKey.generate_api_key(),
)
)

def backwards(self, orm):
Expand Down

0 comments on commit f310cb0

Please sign in to comment.