{"action":"created","issue":{"url":"https://api.github.com/repos/onaio/onadata/issues/928","repository_url":"https://api.github.com/repos/onaio/onadata","labels_url":"https://api.github.com/repos/onaio/onadata/issues/928/labels{/name}","comments_url":"https://api.github.com/repos/onaio/onadata/issues/928/comments","events_url":"https://api.github.com/repos/onaio/onadata/issues/928/events","html_url":"https://github.com/onaio/onadata/issues/928","id":208876073,"number":928,"title":"Unhandled IntegrityError at projects endpoint","user":{"login":"ukanga","id":85585,"avatar_url":"https://avatars0.githubusercontent.com/u/85585?v=4","gravatar_id":"","url":"https://api.github.com/users/ukanga","html_url":"https://github.com/ukanga","followers_url":"https://api.github.com/users/ukanga/followers","following_url":"https://api.github.com/users/ukanga/following{/other_user}","gists_url":"https://api.github.com/users/ukanga/gists{/gist_id}","starred_url":"https://api.github.com/users/ukanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukanga/subscriptions","organizations_url":"https://api.github.com/users/ukanga/orgs","repos_url":"https://api.github.com/users/ukanga/repos","events_url":"https://api.github.com/users/ukanga/events{/privacy}","received_events_url":"https://api.github.com/users/ukanga/received_events","type":"User","site_admin":false},"labels":[{"id":66803078,"url":"https://api.github.com/repos/onaio/onadata/labels/API","name":"API","color":"207de5","default":false},{"id":56754277,"url":"https://api.github.com/repos/onaio/onadata/labels/Error","name":"Error","color":"fc2929","default":false},{"id":454117039,"url":"https://api.github.com/repos/onaio/onadata/labels/Module:%20Projects","name":"Module: Projects","color":"207de5","default":false}],"state":"open","locked":false,"assignee":{"login":"Wambere","id":700719,"avatar_url":"https://avatars0.githubusercontent.com/u/700719?v=4","gravatar_id":"","url":"https://api.github.com/users/Wambere","html_url":"https://github.com/Wambere","followers_url":"https://api.github.com/users/Wambere/followers","following_url":"https://api.github.com/users/Wambere/following{/other_user}","gists_url":"https://api.github.com/users/Wambere/gists{/gist_id}","starred_url":"https://api.github.com/users/Wambere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wambere/subscriptions","organizations_url":"https://api.github.com/users/Wambere/orgs","repos_url":"https://api.github.com/users/Wambere/repos","events_url":"https://api.github.com/users/Wambere/events{/privacy}","received_events_url":"https://api.github.com/users/Wambere/received_events","type":"User","site_admin":false},"assignees":[{"login":"Wambere","id":700719,"avatar_url":"https://avatars0.githubusercontent.com/u/700719?v=4","gravatar_id":"","url":"https://api.github.com/users/Wambere","html_url":"https://github.com/Wambere","followers_url":"https://api.github.com/users/Wambere/followers","following_url":"https://api.github.com/users/Wambere/following{/other_user}","gists_url":"https://api.github.com/users/Wambere/gists{/gist_id}","starred_url":"https://api.github.com/users/Wambere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wambere/subscriptions","organizations_url":"https://api.github.com/users/Wambere/orgs","repos_url":"https://api.github.com/users/Wambere/repos","events_url":"https://api.github.com/users/Wambere/events{/privacy}","received_events_url":"https://api.github.com/users/Wambere/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/onaio/onadata/milestones/57","html_url":"https://github.com/onaio/onadata/milestone/57","labels_url":"https://api.github.com/repos/onaio/onadata/milestones/57/labels","id":3180563,"number":57,"title":"Week 11 - 12","description":"","creator":{"login":"ukanga","id":85585,"avatar_url":"https://avatars0.githubusercontent.com/u/85585?v=4","gravatar_id":"","url":"https://api.github.com/users/ukanga","html_url":"https://github.com/ukanga","followers_url":"https://api.github.com/users/ukanga/followers","following_url":"https://api.github.com/users/ukanga/following{/other_user}","gists_url":"https://api.github.com/users/ukanga/gists{/gist_id}","starred_url":"https://api.github.com/users/ukanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukanga/subscriptions","organizations_url":"https://api.github.com/users/ukanga/orgs","repos_url":"https://api.github.com/users/ukanga/repos","events_url":"https://api.github.com/users/ukanga/events{/privacy}","received_events_url":"https://api.github.com/users/ukanga/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":4,"state":"open","created_at":"2018-03-12T14:54:09Z","updated_at":"2018-03-27T11:54:44Z","due_on":"2018-03-26T07:00:00Z","closed_at":null},"comments":1,"created_at":"2017-02-20T13:13:02Z","updated_at":"2018-03-27T12:06:22Z","closed_at":null,"author_association":"OWNER","body":"```python\r\nIntegrityError at /api/v1/projects\r\nduplicate key value violates unique constraint \"logger_project_name_74cebfdda007f55b_uniq\"\r\nDETAIL:  Key (name, organization_id)=(Monitoring Form, 675) already exists.\r\n\r\n\r\nRequest Method: POST\r\nRequest URL: https://api.ona.io/api/v1/projects\r\nDjango Version: 1.9.5\r\nPython Executable: /..../.virtualenvs/onadata/bin/uwsgi\r\nPython Version: 2.7.6\r\nPython Path: ['/..../.virtualenvs/onadata/src/savreaderwriter/savReaderWriter', '/..../.virtualenvs/onadata/src/savreaderwriter/savReaderWriter/cWriterow', '.', '', '/..../.virtualenvs/onadata/src/django-nose', '/..../.virtualenvs/onadata/src/django-digest', '/..../.virtualenvs/onadata/src/j2xclient', '/..../.virtualenvs/onadata/src/cors-headers', '/..../.virtualenvs/onadata/src/pricing', '/..../.virtualenvs/onadata/src/savreaderwriter', '/..../.virtualenvs/onadata/src/google-export', '/..../.virtualenvs/onadata/lib/python2.7', '/..../.virtualenvs/onadata/lib/python2.7/plat-x86_64-linux-gnu', '/..../.virtualenvs/onadata/lib/python2.7/lib-tk', '/..../.virtualenvs/onadata/lib/python2.7/lib-old', '/..../.virtualenvs/onadata/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/..../.virtualenvs/onadata/local/lib/python2.7/site-packages']\r\nServer time: Mon, 20 Feb 2017 06:35:00 -0500\r\nInstalled Applications:\r\n('google_export',\r\n 'pricing',\r\n 'django.contrib.auth',\r\n 'django.contrib.contenttypes',\r\n 'django.contrib.sessions',\r\n 'django.contrib.sites',\r\n 'django.contrib.messages',\r\n 'django.contrib.staticfiles',\r\n 'django.contrib.humanize',\r\n 'django.contrib.admin',\r\n 'django.contrib.admindocs',\r\n 'django.contrib.gis',\r\n 'registration',\r\n 'django_nose',\r\n 'django_digest',\r\n 'corsheaders',\r\n 'oauth2_provider',\r\n 'rest_framework',\r\n 'rest_framework.authtoken',\r\n 'taggit',\r\n 'readonly',\r\n 'onadata.apps.logger',\r\n 'onadata.apps.viewer',\r\n 'onadata.apps.main',\r\n 'onadata.apps.restservice',\r\n 'onadata.apps.api',\r\n 'guardian',\r\n 'djcelery',\r\n 'onadata.apps.sms_support',\r\n 'onadata.libs',\r\n 'reversion')\r\nInstalled Middleware:\r\n('multidb.middleware.PinningRouterMiddleware',\r\n 'onadata.libs.profiling.sql.SqlTimingMiddleware',\r\n 'django.middleware.http.ConditionalGetMiddleware',\r\n 'django.middleware.cache.UpdateCacheMiddleware',\r\n 'django.middleware.common.CommonMiddleware',\r\n 'django.middleware.cache.FetchFromCacheMiddleware',\r\n 'django.contrib.sessions.middleware.SessionMiddleware',\r\n 'onadata.libs.utils.middleware.LocaleMiddlewareWithTweaks',\r\n 'django.middleware.csrf.CsrfViewMiddleware',\r\n 'corsheaders.middleware.CorsMiddleware',\r\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\r\n 'django.contrib.messages.middleware.MessageMiddleware',\r\n 'onadata.libs.utils.middleware.HTTPResponseNotAllowedMiddleware',\r\n 'readonly.middleware.DatabaseReadOnlyMiddleware')\r\n\r\n\r\nTraceback:\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/core/handlers/base.py\" in get_response\r\n  149.                     response = self.process_exception_by_middleware(e, request)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/core/handlers/base.py\" in get_response\r\n  147.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/views/decorators/csrf.py\" in wrapped_view\r\n  58.         return view_func(*args, **kwargs)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/rest_framework/viewsets.py\" in view\r\n  87.             return self.dispatch(request, *args, **kwargs)\r\n\r\nFile \"./onadata/libs/mixins/profiler_mixin.py\" in dispatch\r\n  34.         ret = super(ProfilerMixin, self).dispatch(request, *args, **kwargs)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/rest_framework/views.py\" in dispatch\r\n  466.             response = self.handle_exception(exc)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/rest_framework/views.py\" in dispatch\r\n  463.             response = handler(request, *args, **kwargs)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/rest_framework/mixins.py\" in create\r\n  21.         self.perform_create(serializer)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/rest_framework/mixins.py\" in perform_create\r\n  26.         serializer.save()\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/rest_framework/serializers.py\" in save\r\n  191.             self.instance = self.create(validated_data)\r\n\r\nFile \"./onadata/libs/serializers/project_serializer.py\" in create\r\n  331.             metadata=validated_data.get('metadata', dict())\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/manager.py\" in manager_method\r\n  122.                 return getattr(self.get_queryset(), name)(*args, **kwargs)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/query.py\" in create\r\n  401.         obj.save(force_insert=True, using=self.db)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/base.py\" in save\r\n  708.                        force_update=force_update, update_fields=update_fields)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/base.py\" in save_base\r\n  736.             updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/base.py\" in _save_table\r\n  820.             result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/base.py\" in _do_insert\r\n  859.                                using=using, raw=raw)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/manager.py\" in manager_method\r\n  122.                 return getattr(self.get_queryset(), name)(*args, **kwargs)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/query.py\" in _insert\r\n  1039.         return query.get_compiler(using=using).execute_sql(return_id)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py\" in execute_sql\r\n  1060.                 cursor.execute(sql, params)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/backends/utils.py\" in execute\r\n  64.                 return self.cursor.execute(sql, params)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/utils.py\" in __exit__\r\n  95.                 six.reraise(dj_exc_type, dj_exc_value, traceback)\r\n\r\nFile \"/..../.virtualenvs/onadata/local/lib/python2.7/site-packages/django/db/backends/utils.py\" in execute\r\n  64.                 return self.cursor.execute(sql, params)\r\n\r\nException Type: IntegrityError at /api/v1/projects\r\nException Value: duplicate key value violates unique constraint \"logger_project_name_74cebfdda007f55b_uniq\"\r\nDETAIL:  Key (name, organization_id)=(Monitoring Form, 675) already exists.\r\n```"},"comment":{"url":"https://api.github.com/repos/onaio/onadata/issues/comments/376500564","html_url":"https://github.com/onaio/onadata/issues/928#issuecomment-376500564","issue_url":"https://api.github.com/repos/onaio/onadata/issues/928","id":376500564,"user":{"login":"ukanga","id":85585,"avatar_url":"https://avatars0.githubusercontent.com/u/85585?v=4","gravatar_id":"","url":"https://api.github.com/users/ukanga","html_url":"https://github.com/ukanga","followers_url":"https://api.github.com/users/ukanga/followers","following_url":"https://api.github.com/users/ukanga/following{/other_user}","gists_url":"https://api.github.com/users/ukanga/gists{/gist_id}","starred_url":"https://api.github.com/users/ukanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukanga/subscriptions","organizations_url":"https://api.github.com/users/ukanga/orgs","repos_url":"https://api.github.com/users/ukanga/repos","events_url":"https://api.github.com/users/ukanga/events{/privacy}","received_events_url":"https://api.github.com/users/ukanga/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T12:06:22Z","updated_at":"2018-03-27T12:06:22Z","author_association":"OWNER","body":"The exception captured on sentry is an integrity error. I think zebra may be allowing someone to submit twice while another request is in flight already but not yet committed. We probably should create an issue for this.\r\nIf a `ValidationError` had been sent I would not expect the above exception."}}
{"actor":{"display_login":"ukanga"}}