{"action":"closed","issue":{"url":"https://api.github.com/repos/HeliumEdu/platform/issues/125","repository_url":"https://api.github.com/repos/HeliumEdu/platform","labels_url":"https://api.github.com/repos/HeliumEdu/platform/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/HeliumEdu/platform/issues/125/comments","events_url":"https://api.github.com/repos/HeliumEdu/platform/issues/125/events","html_url":"https://github.com/HeliumEdu/platform/issues/125","id":352683763,"node_id":"MDU6SXNzdWUzNTI2ODM3NjM=","number":125,"title":"IntegrityError: (1062, \"Duplicate entry '6715-Final Mark' for key 'planner_category_course_id_e835c4c298296f0_uniq'\")","user":{"login":"alexdlaird","id":1660326,"node_id":"MDQ6VXNlcjE2NjAzMjY=","avatar_url":"https://avatars0.githubusercontent.com/u/1660326?v=4","gravatar_id":"","url":"https://api.github.com/users/alexdlaird","html_url":"https://github.com/alexdlaird","followers_url":"https://api.github.com/users/alexdlaird/followers","following_url":"https://api.github.com/users/alexdlaird/following{/other_user}","gists_url":"https://api.github.com/users/alexdlaird/gists{/gist_id}","starred_url":"https://api.github.com/users/alexdlaird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexdlaird/subscriptions","organizations_url":"https://api.github.com/users/alexdlaird/orgs","repos_url":"https://api.github.com/users/alexdlaird/repos","events_url":"https://api.github.com/users/alexdlaird/events{/privacy}","received_events_url":"https://api.github.com/users/alexdlaird/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-21T19:48:01Z","updated_at":"2018-08-21T20:38:17Z","closed_at":"2018-08-21T20:38:17Z","author_association":"CONTRIBUTOR","body":"View details in Rollbar: [https://rollbar.com/HeliumEdu/platform/items/33/](https://rollbar.com/HeliumEdu/platform/items/33/)\n\n```\nTraceback (most recent call last):\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/core/handlers/base.py\", line 126, in _get_response\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/views/decorators/csrf.py\", line 54, in wrapped_view\n    return view_func(*args, **kwargs)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/views/generic/base.py\", line 69, in view\n    return self.dispatch(request, *args, **kwargs)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/rest_framework/views.py\", line 483, in dispatch\n    response = self.handle_exception(exc)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/rest_framework/views.py\", line 443, in handle_exception\n    self.raise_uncaught_exception(exc)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/rest_framework/views.py\", line 480, in dispatch\n    response = handler(request, *args, **kwargs)\n  File \"/srv/helium/platform/helium/planner/views/apis/categoryviews.py\", line 74, in post\n    response = self.create(request, *args, **kwargs)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/rest_framework/mixins.py\", line 21, in create\n    self.perform_create(serializer)\n  File \"/srv/helium/platform/helium/planner/views/apis/categoryviews.py\", line 71, in perform_create\n    serializer.save(course_id=self.kwargs['course'])\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/rest_framework/serializers.py\", line 214, in save\n    self.instance = self.create(validated_data)\n  File \"/srv/helium/platform/helium/planner/serializers/categoryserializer.py\", line 52, in create\n    return super().create(validated_data)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/rest_framework/serializers.py\", line 940, in create\n    instance = ModelClass.objects.create(**validated_data)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/manager.py\", line 82, in manager_method\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/query.py\", line 417, in create\n    obj.save(force_insert=True, using=self.db)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/base.py\", line 729, in save\n    force_update=force_update, update_fields=update_fields)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/base.py\", line 759, in save_base\n    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/base.py\", line 842, in _save_table\n    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/base.py\", line 880, in _do_insert\n    using=using, raw=raw)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/manager.py\", line 82, in manager_method\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/query.py\", line 1125, in _insert\n    return query.get_compiler(using=using).execute_sql(return_id)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/models/sql/compiler.py\", line 1285, in execute_sql\n    cursor.execute(sql, params)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/utils.py\", line 68, in execute\n    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/utils.py\", line 77, in _execute_with_wrappers\n    return executor(sql, params, many, context)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/utils.py\", line 85, in _execute\n    return self.cursor.execute(sql, params)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/utils.py\", line 89, in __exit__\n    raise dj_exc_value.with_traceback(traceback) from exc_value\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/utils.py\", line 85, in _execute\n    return self.cursor.execute(sql, params)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/mysql/base.py\", line 71, in execute\n    return self.cursor.execute(query, args)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 250, in execute\n    self.errorhandler(self, exc, value)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/connections.py\", line 50, in defaulterrorhandler\n    raise errorvalue\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 247, in execute\n    res = self._query(query)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 412, in _query\n    rowcount = self._do_query(q)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 375, in _do_query\n    db.query(q)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/connections.py\", line 276, in query\n    _mysql.connection.query(self, query)\nIntegrityError: (1062, \"Duplicate entry '6715-Final Mark' for key 'planner_category_course_id_e835c4c298296f0_uniq'\")Traceback (most recent call last):\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/utils.py\", line 85, in _execute\n    return self.cursor.execute(sql, params)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/django/db/backends/mysql/base.py\", line 71, in execute\n    return self.cursor.execute(query, args)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 250, in execute\n    self.errorhandler(self, exc, value)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/connections.py\", line 50, in defaulterrorhandler\n    raise errorvalue\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 247, in execute\n    res = self._query(query)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 412, in _query\n    rowcount = self._do_query(q)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/cursors.py\", line 375, in _do_query\n    db.query(q)\n  File \"/usr/local/venvs/helium_platform/lib/python3.5/site-packages/MySQLdb/connections.py\", line 276, in query\n    _mysql.connection"}}
{"actor":{"display_login":"alexdlaird"}}