We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Accounts parent_id in records table not being set correctly
Ubuntu 16.04
From source Latest commit 5e2a13b
Postgres database

1. Change kinto.ini to enable accounts
2. Create admin user myadmin with
`kinto.account_create_principals = system.Everyone
`
3. Then change to
`kinto.account_create_principals = account:myadmin`

Final kinto.ini changes
```
multiauth.policies = account
multiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy
# Allow anyone to create accounts.
kinto.account_create_principals = account:myadmin
# Set user 'account:admin' as the administrator.
kinto.account_write_principals = account:myadmin
kinto.account_read_principals = account:myadmin

```

4.  Create user using myadmin auth
echo '{"data": {"id": "zzz", "password": "test"}}' | http POST http://192.168.2.12:8888/v1/accounts --auth 'myadmin:test'

5. Try to delete user
`http DELETE http://192.168.2.12:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'`

```
{
    "code": 404,
    "details": {
        "id": "zzz",
        "resource_name": "account"
    },
    "errno": 110,
    "error": "Not Found"
}
```

6. If you change user zzz's password then Delete is a success
echo '{"data": {"password": "asdf"}}' | http PUT http://localhost:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'

If you look at the records table in Postgres you will see that the initial creation of user zzz's parent_id is set to *

After changing zzz's password parent_id is set to zzz

Accounts parent_id in records table not being set correctly
Ubuntu 16.04
From source Latest commit 5e2a13b
Postgres database

1. Change kinto.ini to enable accounts
2. Create admin user myadmin with
`kinto.account_create_principals = system.Everyone
`
3. Then change to
`kinto.account_create_principals = account:myadmin`

Final kinto.ini changes
```
multiauth.policies = account
multiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy
# Allow anyone to create accounts.
kinto.account_create_principals = account:myadmin
# Set user 'account:admin' as the administrator.
kinto.account_write_principals = account:myadmin
kinto.account_read_principals = account:myadmin

```

4.  Create user using myadmin auth
echo '{"data": {"id": "zzz", "password": "test"}}' | http POST http://192.168.2.12:8888/v1/accounts --auth 'myadmin:test'

5. Try to delete user
`http DELETE http://192.168.2.12:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'`

```
{
    "code": 404,
    "details": {
        "id": "zzz",
        "resource_name": "account"
    },
    "errno": 110,
    "error": "Not Found"
}
```

6. If you change user zzz's password then Delete is a success
echo '{"data": {"password": "asdf"}}' | http PUT http://localhost:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'

If you look at the records table in Postgres you will see that the initial creation of user zzz's parent_id is set to *

After changing zzz's password parent_id is set to zzz


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `kinto/plugins/accounts/views.py`
Content:
```
1 import bcrypt
2 import colander
3 from pyramid import httpexceptions
4 from pyramid.decorator import reify
5 from pyramid.security import Authenticated, Everyone
6 from pyramid.settings import aslist
7 
8 from kinto.views import NameGenerator
9 from kinto.core import resource
10 from kinto.core.errors import raise_invalid, http_error
11 
12 
13 class AccountSchema(resource.ResourceSchema):
14     password = colander.SchemaNode(colander.String())
15 
16 
17 @resource.register()
18 class Account(resource.ShareableResource):
19 
20     schema = AccountSchema
21 
22     def __init__(self, request, context):
23         # Store if current user is administrator (before accessing get_parent_id())
24         allowed_from_settings = request.registry.settings.get('account_write_principals', [])
25         context.is_administrator = len(set(aslist(allowed_from_settings)) &
26                                        set(request.prefixed_principals)) > 0
27         # Shortcut to check if current is anonymous (before get_parent_id()).
28         context.is_anonymous = Authenticated not in request.effective_principals
29 
30         super().__init__(request, context)
31 
32         # Overwrite the current principal set by ShareableResource.
33         if self.model.current_principal == Everyone:
34             # Creation is anonymous, but author with write perm is this:
35             # XXX: only works if policy name is account in settings.
36             self.model.current_principal = 'account:{}'.format(self.model.parent_id)
37 
38     @reify
39     def id_generator(self):
40         # This generator is used for ID validation.
41         return NameGenerator()
42 
43     def get_parent_id(self, request):
44         # The whole challenge here is that we want to isolate what
45         # authenticated users can list, but give access to everything to
46         # administrators.
47         # Plus when anonymous create accounts, we have to set their parent id
48         # to the same value they would obtain when authenticated.
49         if self.context.is_administrator:
50             if self.context.on_collection:
51                 # Admin see all accounts.
52                 return '*'
53             else:
54                 # No pattern matching for admin on single record.
55                 return request.matchdict['id']
56 
57         if not self.context.is_anonymous:
58             # Authenticated users see their own account only.
59             return request.selected_userid
60 
61         # Anonymous creation with PUT.
62         if 'id' in request.matchdict:
63             return request.matchdict['id']
64 
65         try:
66             # Anonymous creation with POST.
67             return request.json['data']['id']
68         except (ValueError, KeyError):
69             # Bad POST data.
70             if request.method.lower() == 'post':
71                 error_details = {
72                     'name': 'data.id',
73                     'description': 'data.id in body: Required'
74                 }
75                 raise_invalid(request, **error_details)
76             # Anonymous GET
77             error_msg = 'Cannot read accounts.'
78             raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)
79 
80     def collection_post(self):
81         result = super(Account, self).collection_post()
82         if self.context.is_anonymous and self.request.response.status_code == 200:
83             error_details = {
84                 'message': 'Account ID %r already exists' % result['data']['id']
85             }
86             raise http_error(httpexceptions.HTTPForbidden(), **error_details)
87         return result
88 
89     def process_record(self, new, old=None):
90         new = super(Account, self).process_record(new, old)
91 
92         # Store password safely in database as str
93         # (bcrypt.hashpw returns base64 bytes).
94         pwd_str = new["password"].encode(encoding='utf-8')
95         hashed = bcrypt.hashpw(pwd_str, bcrypt.gensalt())
96         new["password"] = hashed.decode(encoding='utf-8')
97 
98         # Administrators can reach other accounts and anonymous have no
99         # selected_userid. So do not try to enforce.
100         if self.context.is_administrator or self.context.is_anonymous:
101             return new
102 
103         # Otherwise, we force the id to match the authenticated username.
104         if new[self.model.id_field] != self.request.selected_userid:
105             error_details = {
106                 'name': 'data.id',
107                 'description': 'Username and account ID do not match.',
108             }
109             raise_invalid(self.request, **error_details)
110 
111         return new
112
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/kinto/plugins/accounts/views.py b/kinto/plugins/accounts/views.py
--- a/kinto/plugins/accounts/views.py
+++ b/kinto/plugins/accounts/views.py
@@ -10,6 +10,23 @@
 from kinto.core.errors import raise_invalid, http_error
 
 
+def _extract_posted_body_id(request):
+    try:
+        # Anonymous creation with POST.
+        return request.json['data']['id']
+    except (ValueError, KeyError):
+        # Bad POST data.
+        if request.method.lower() == 'post':
+            error_details = {
+                'name': 'data.id',
+                'description': 'data.id in body: Required'
+            }
+            raise_invalid(request, **error_details)
+        # Anonymous GET
+        error_msg = 'Cannot read accounts.'
+        raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)
+
+
 class AccountSchema(resource.ResourceSchema):
     password = colander.SchemaNode(colander.String())
 
@@ -30,7 +47,7 @@
         super().__init__(request, context)
 
         # Overwrite the current principal set by ShareableResource.
-        if self.model.current_principal == Everyone:
+        if self.model.current_principal == Everyone or context.is_administrator:
             # Creation is anonymous, but author with write perm is this:
             # XXX: only works if policy name is account in settings.
             self.model.current_principal = 'account:{}'.format(self.model.parent_id)
@@ -48,8 +65,12 @@
         # to the same value they would obtain when authenticated.
         if self.context.is_administrator:
             if self.context.on_collection:
-                # Admin see all accounts.
-                return '*'
+                # Accounts created by admin should have userid as parent.
+                if request.method.lower() == 'post':
+                    return _extract_posted_body_id(request)
+                else:
+                    # Admin see all accounts.
+                    return '*'
             else:
                 # No pattern matching for admin on single record.
                 return request.matchdict['id']
@@ -62,20 +83,7 @@
         if 'id' in request.matchdict:
             return request.matchdict['id']
 
-        try:
-            # Anonymous creation with POST.
-            return request.json['data']['id']
-        except (ValueError, KeyError):
-            # Bad POST data.
-            if request.method.lower() == 'post':
-                error_details = {
-                    'name': 'data.id',
-                    'description': 'data.id in body: Required'
-                }
-                raise_invalid(request, **error_details)
-            # Anonymous GET
-            error_msg = 'Cannot read accounts.'
-            raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)
+        return _extract_posted_body_id(request)
 
     def collection_post(self):
         result = super(Account, self).collection_post()

{"golden_diff": "diff --git a/kinto/plugins/accounts/views.py b/kinto/plugins/accounts/views.py\n--- a/kinto/plugins/accounts/views.py\n+++ b/kinto/plugins/accounts/views.py\n@@ -10,6 +10,23 @@\n from kinto.core.errors import raise_invalid, http_error\n \n \n+def _extract_posted_body_id(request):\n+    try:\n+        # Anonymous creation with POST.\n+        return request.json['data']['id']\n+    except (ValueError, KeyError):\n+        # Bad POST data.\n+        if request.method.lower() == 'post':\n+            error_details = {\n+                'name': 'data.id',\n+                'description': 'data.id in body: Required'\n+            }\n+            raise_invalid(request, **error_details)\n+        # Anonymous GET\n+        error_msg = 'Cannot read accounts.'\n+        raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)\n+\n+\n class AccountSchema(resource.ResourceSchema):\n     password = colander.SchemaNode(colander.String())\n \n@@ -30,7 +47,7 @@\n         super().__init__(request, context)\n \n         # Overwrite the current principal set by ShareableResource.\n-        if self.model.current_principal == Everyone:\n+        if self.model.current_principal == Everyone or context.is_administrator:\n             # Creation is anonymous, but author with write perm is this:\n             # XXX: only works if policy name is account in settings.\n             self.model.current_principal = 'account:{}'.format(self.model.parent_id)\n@@ -48,8 +65,12 @@\n         # to the same value they would obtain when authenticated.\n         if self.context.is_administrator:\n             if self.context.on_collection:\n-                # Admin see all accounts.\n-                return '*'\n+                # Accounts created by admin should have userid as parent.\n+                if request.method.lower() == 'post':\n+                    return _extract_posted_body_id(request)\n+                else:\n+                    # Admin see all accounts.\n+                    return '*'\n             else:\n                 # No pattern matching for admin on single record.\n                 return request.matchdict['id']\n@@ -62,20 +83,7 @@\n         if 'id' in request.matchdict:\n             return request.matchdict['id']\n \n-        try:\n-            # Anonymous creation with POST.\n-            return request.json['data']['id']\n-        except (ValueError, KeyError):\n-            # Bad POST data.\n-            if request.method.lower() == 'post':\n-                error_details = {\n-                    'name': 'data.id',\n-                    'description': 'data.id in body: Required'\n-                }\n-                raise_invalid(request, **error_details)\n-            # Anonymous GET\n-            error_msg = 'Cannot read accounts.'\n-            raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)\n+        return _extract_posted_body_id(request)\n \n     def collection_post(self):\n         result = super(Account, self).collection_post()\n", "issue": "Accounts parent_id in records table not being set correctly\nUbuntu 16.04\r\nFrom source Latest commit 5e2a13b\r\nPostgres database\r\n\r\n1. Change kinto.ini to enable accounts\r\n2. Create admin user myadmin with\r\n`kinto.account_create_principals = system.Everyone\r\n`\r\n3. Then change to\r\n`kinto.account_create_principals = account:myadmin`\r\n\r\nFinal kinto.ini changes\r\n```\r\nmultiauth.policies = account\r\nmultiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy\r\n# Allow anyone to create accounts.\r\nkinto.account_create_principals = account:myadmin\r\n# Set user 'account:admin' as the administrator.\r\nkinto.account_write_principals = account:myadmin\r\nkinto.account_read_principals = account:myadmin\r\n\r\n```\r\n\r\n4.  Create user using myadmin auth\r\necho '{\"data\": {\"id\": \"zzz\", \"password\": \"test\"}}' | http POST http://192.168.2.12:8888/v1/accounts --auth 'myadmin:test'\r\n\r\n5. Try to delete user\r\n`http DELETE http://192.168.2.12:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'`\r\n\r\n```\r\n{\r\n    \"code\": 404,\r\n    \"details\": {\r\n        \"id\": \"zzz\",\r\n        \"resource_name\": \"account\"\r\n    },\r\n    \"errno\": 110,\r\n    \"error\": \"Not Found\"\r\n}\r\n```\r\n\r\n6. If you change user zzz's password then Delete is a success\r\necho '{\"data\": {\"password\": \"asdf\"}}' | http PUT http://localhost:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'\r\n\r\nIf you look at the records table in Postgres you will see that the initial creation of user zzz's parent_id is set to *\r\n\r\nAfter changing zzz's password parent_id is set to zzz\r\n\nAccounts parent_id in records table not being set correctly\nUbuntu 16.04\r\nFrom source Latest commit 5e2a13b\r\nPostgres database\r\n\r\n1. Change kinto.ini to enable accounts\r\n2. Create admin user myadmin with\r\n`kinto.account_create_principals = system.Everyone\r\n`\r\n3. Then change to\r\n`kinto.account_create_principals = account:myadmin`\r\n\r\nFinal kinto.ini changes\r\n```\r\nmultiauth.policies = account\r\nmultiauth.policy.account.use = kinto.plugins.accounts.authentication.AccountsAuthenticationPolicy\r\n# Allow anyone to create accounts.\r\nkinto.account_create_principals = account:myadmin\r\n# Set user 'account:admin' as the administrator.\r\nkinto.account_write_principals = account:myadmin\r\nkinto.account_read_principals = account:myadmin\r\n\r\n```\r\n\r\n4.  Create user using myadmin auth\r\necho '{\"data\": {\"id\": \"zzz\", \"password\": \"test\"}}' | http POST http://192.168.2.12:8888/v1/accounts --auth 'myadmin:test'\r\n\r\n5. Try to delete user\r\n`http DELETE http://192.168.2.12:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'`\r\n\r\n```\r\n{\r\n    \"code\": 404,\r\n    \"details\": {\r\n        \"id\": \"zzz\",\r\n        \"resource_name\": \"account\"\r\n    },\r\n    \"errno\": 110,\r\n    \"error\": \"Not Found\"\r\n}\r\n```\r\n\r\n6. If you change user zzz's password then Delete is a success\r\necho '{\"data\": {\"password\": \"asdf\"}}' | http PUT http://localhost:8888/v1/accounts/zzz --verbose --auth 'myadmin:test'\r\n\r\nIf you look at the records table in Postgres you will see that the initial creation of user zzz's parent_id is set to *\r\n\r\nAfter changing zzz's password parent_id is set to zzz\r\n\n", "before_files": [{"content": "import bcrypt\nimport colander\nfrom pyramid import httpexceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Authenticated, Everyone\nfrom pyramid.settings import aslist\n\nfrom kinto.views import NameGenerator\nfrom kinto.core import resource\nfrom kinto.core.errors import raise_invalid, http_error\n\n\nclass AccountSchema(resource.ResourceSchema):\n    password = colander.SchemaNode(colander.String())\n\n\n@resource.register()\nclass Account(resource.ShareableResource):\n\n    schema = AccountSchema\n\n    def __init__(self, request, context):\n        # Store if current user is administrator (before accessing get_parent_id())\n        allowed_from_settings = request.registry.settings.get('account_write_principals', [])\n        context.is_administrator = len(set(aslist(allowed_from_settings)) &\n                                       set(request.prefixed_principals)) > 0\n        # Shortcut to check if current is anonymous (before get_parent_id()).\n        context.is_anonymous = Authenticated not in request.effective_principals\n\n        super().__init__(request, context)\n\n        # Overwrite the current principal set by ShareableResource.\n        if self.model.current_principal == Everyone:\n            # Creation is anonymous, but author with write perm is this:\n            # XXX: only works if policy name is account in settings.\n            self.model.current_principal = 'account:{}'.format(self.model.parent_id)\n\n    @reify\n    def id_generator(self):\n        # This generator is used for ID validation.\n        return NameGenerator()\n\n    def get_parent_id(self, request):\n        # The whole challenge here is that we want to isolate what\n        # authenticated users can list, but give access to everything to\n        # administrators.\n        # Plus when anonymous create accounts, we have to set their parent id\n        # to the same value they would obtain when authenticated.\n        if self.context.is_administrator:\n            if self.context.on_collection:\n                # Admin see all accounts.\n                return '*'\n            else:\n                # No pattern matching for admin on single record.\n                return request.matchdict['id']\n\n        if not self.context.is_anonymous:\n            # Authenticated users see their own account only.\n            return request.selected_userid\n\n        # Anonymous creation with PUT.\n        if 'id' in request.matchdict:\n            return request.matchdict['id']\n\n        try:\n            # Anonymous creation with POST.\n            return request.json['data']['id']\n        except (ValueError, KeyError):\n            # Bad POST data.\n            if request.method.lower() == 'post':\n                error_details = {\n                    'name': 'data.id',\n                    'description': 'data.id in body: Required'\n                }\n                raise_invalid(request, **error_details)\n            # Anonymous GET\n            error_msg = 'Cannot read accounts.'\n            raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)\n\n    def collection_post(self):\n        result = super(Account, self).collection_post()\n        if self.context.is_anonymous and self.request.response.status_code == 200:\n            error_details = {\n                'message': 'Account ID %r already exists' % result['data']['id']\n            }\n            raise http_error(httpexceptions.HTTPForbidden(), **error_details)\n        return result\n\n    def process_record(self, new, old=None):\n        new = super(Account, self).process_record(new, old)\n\n        # Store password safely in database as str\n        # (bcrypt.hashpw returns base64 bytes).\n        pwd_str = new[\"password\"].encode(encoding='utf-8')\n        hashed = bcrypt.hashpw(pwd_str, bcrypt.gensalt())\n        new[\"password\"] = hashed.decode(encoding='utf-8')\n\n        # Administrators can reach other accounts and anonymous have no\n        # selected_userid. So do not try to enforce.\n        if self.context.is_administrator or self.context.is_anonymous:\n            return new\n\n        # Otherwise, we force the id to match the authenticated username.\n        if new[self.model.id_field] != self.request.selected_userid:\n            error_details = {\n                'name': 'data.id',\n                'description': 'Username and account ID do not match.',\n            }\n            raise_invalid(self.request, **error_details)\n\n        return new\n", "path": "kinto/plugins/accounts/views.py"}], "after_files": [{"content": "import bcrypt\nimport colander\nfrom pyramid import httpexceptions\nfrom pyramid.decorator import reify\nfrom pyramid.security import Authenticated, Everyone\nfrom pyramid.settings import aslist\n\nfrom kinto.views import NameGenerator\nfrom kinto.core import resource\nfrom kinto.core.errors import raise_invalid, http_error\n\n\ndef _extract_posted_body_id(request):\n    try:\n        # Anonymous creation with POST.\n        return request.json['data']['id']\n    except (ValueError, KeyError):\n        # Bad POST data.\n        if request.method.lower() == 'post':\n            error_details = {\n                'name': 'data.id',\n                'description': 'data.id in body: Required'\n            }\n            raise_invalid(request, **error_details)\n        # Anonymous GET\n        error_msg = 'Cannot read accounts.'\n        raise http_error(httpexceptions.HTTPUnauthorized(), error=error_msg)\n\n\nclass AccountSchema(resource.ResourceSchema):\n    password = colander.SchemaNode(colander.String())\n\n\n@resource.register()\nclass Account(resource.ShareableResource):\n\n    schema = AccountSchema\n\n    def __init__(self, request, context):\n        # Store if current user is administrator (before accessing get_parent_id())\n        allowed_from_settings = request.registry.settings.get('account_write_principals', [])\n        context.is_administrator = len(set(aslist(allowed_from_settings)) &\n                                       set(request.prefixed_principals)) > 0\n        # Shortcut to check if current is anonymous (before get_parent_id()).\n        context.is_anonymous = Authenticated not in request.effective_principals\n\n        super().__init__(request, context)\n\n        # Overwrite the current principal set by ShareableResource.\n        if self.model.current_principal == Everyone or context.is_administrator:\n            # Creation is anonymous, but author with write perm is this:\n            # XXX: only works if policy name is account in settings.\n            self.model.current_principal = 'account:{}'.format(self.model.parent_id)\n\n    @reify\n    def id_generator(self):\n        # This generator is used for ID validation.\n        return NameGenerator()\n\n    def get_parent_id(self, request):\n        # The whole challenge here is that we want to isolate what\n        # authenticated users can list, but give access to everything to\n        # administrators.\n        # Plus when anonymous create accounts, we have to set their parent id\n        # to the same value they would obtain when authenticated.\n        if self.context.is_administrator:\n            if self.context.on_collection:\n                # Accounts created by admin should have userid as parent.\n                if request.method.lower() == 'post':\n                    return _extract_posted_body_id(request)\n                else:\n                    # Admin see all accounts.\n                    return '*'\n            else:\n                # No pattern matching for admin on single record.\n                return request.matchdict['id']\n\n        if not self.context.is_anonymous:\n            # Authenticated users see their own account only.\n            return request.selected_userid\n\n        # Anonymous creation with PUT.\n        if 'id' in request.matchdict:\n            return request.matchdict['id']\n\n        return _extract_posted_body_id(request)\n\n    def collection_post(self):\n        result = super(Account, self).collection_post()\n        if self.context.is_anonymous and self.request.response.status_code == 200:\n            error_details = {\n                'message': 'Account ID %r already exists' % result['data']['id']\n            }\n            raise http_error(httpexceptions.HTTPForbidden(), **error_details)\n        return result\n\n    def process_record(self, new, old=None):\n        new = super(Account, self).process_record(new, old)\n\n        # Store password safely in database as str\n        # (bcrypt.hashpw returns base64 bytes).\n        pwd_str = new[\"password\"].encode(encoding='utf-8')\n        hashed = bcrypt.hashpw(pwd_str, bcrypt.gensalt())\n        new[\"password\"] = hashed.decode(encoding='utf-8')\n\n        # Administrators can reach other accounts and anonymous have no\n        # selected_userid. So do not try to enforce.\n        if self.context.is_administrator or self.context.is_anonymous:\n            return new\n\n        # Otherwise, we force the id to match the authenticated username.\n        if new[self.model.id_field] != self.request.selected_userid:\n            error_details = {\n                'name': 'data.id',\n                'description': 'Username and account ID do not match.',\n            }\n            raise_invalid(self.request, **error_details)\n\n        return new\n", "path": "kinto/plugins/accounts/views.py"}]}