Skip to content
Snippets Groups Projects
Commit 40e4023d authored by jan.bednarik's avatar jan.bednarik
Browse files

Replace nameCollisionId with hasCollidingName in API Admin and User types.

parent d32ca713
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,7 @@ class User(graphene.ObjectType): ...@@ -87,7 +87,7 @@ class User(graphene.ObjectType):
openid_uid = graphene.String() openid_uid = graphene.String()
first_name = graphene.String() first_name = graphene.String()
last_name = graphene.String() last_name = graphene.String()
name_collision_id = graphene.Int() has_colliding_name = graphene.Boolean()
email = graphene.String() email = graphene.String()
is_author = graphene.Boolean() is_author = graphene.Boolean()
extra = JSONString() extra = JSONString()
...@@ -102,7 +102,7 @@ class User(graphene.ObjectType): ...@@ -102,7 +102,7 @@ class User(graphene.ObjectType):
openid_uid=user.openid_uid, openid_uid=user.openid_uid,
first_name=user.first_name, first_name=user.first_name,
last_name=user.last_name, last_name=user.last_name,
name_collision_id=user.name_collision_id, has_colliding_name=user.has_colliding_name,
email=user.email, email=user.email,
is_author=user.is_author, is_author=user.is_author,
extra=user.extra, extra=user.extra,
...@@ -120,7 +120,7 @@ class User(graphene.ObjectType): ...@@ -120,7 +120,7 @@ class User(graphene.ObjectType):
class Author(graphene.ObjectType): class Author(graphene.ObjectType):
first_name = graphene.String() first_name = graphene.String()
last_name = graphene.String() last_name = graphene.String()
name_collision_id = graphene.Int() has_colliding_name = graphene.Boolean()
total_reports = graphene.Int() total_reports = graphene.Int()
extra = JSONString() extra = JSONString()
reports = relay.ConnectionField(ReportConnection) reports = relay.ConnectionField(ReportConnection)
...@@ -134,7 +134,7 @@ class Author(graphene.ObjectType): ...@@ -134,7 +134,7 @@ class Author(graphene.ObjectType):
id=user.id, id=user.id,
first_name=user.first_name, first_name=user.first_name,
last_name=user.last_name, last_name=user.last_name,
name_collision_id=user.name_collision_id, has_colliding_name=user.has_colliding_name,
extra=user.extra, extra=user.extra,
total_reports=user.total_reports, total_reports=user.total_reports,
) )
......
...@@ -16,9 +16,9 @@ snapshots['test_all 1'] = { ...@@ -16,9 +16,9 @@ snapshots['test_all 1'] = {
'node': { 'node': {
'extra': None, 'extra': None,
'firstName': 'Shaun', 'firstName': 'Shaun',
'hasCollidingName': False,
'id': 'QXV0aG9yOjM=', 'id': 'QXV0aG9yOjM=',
'lastName': 'Sheep', 'lastName': 'Sheep',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
}, },
...@@ -27,9 +27,9 @@ snapshots['test_all 1'] = { ...@@ -27,9 +27,9 @@ snapshots['test_all 1'] = {
'node': { 'node': {
'extra': None, 'extra': None,
'firstName': 'Spongebob', 'firstName': 'Spongebob',
'hasCollidingName': False,
'id': 'QXV0aG9yOjI=', 'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants', 'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
}, },
...@@ -38,9 +38,9 @@ snapshots['test_all 1'] = { ...@@ -38,9 +38,9 @@ snapshots['test_all 1'] = {
'node': { 'node': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
} }
...@@ -65,9 +65,9 @@ snapshots['test_first 1'] = { ...@@ -65,9 +65,9 @@ snapshots['test_first 1'] = {
'node': { 'node': {
'extra': None, 'extra': None,
'firstName': 'Shaun', 'firstName': 'Shaun',
'hasCollidingName': False,
'id': 'QXV0aG9yOjM=', 'id': 'QXV0aG9yOjM=',
'lastName': 'Sheep', 'lastName': 'Sheep',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
}, },
...@@ -76,9 +76,9 @@ snapshots['test_first 1'] = { ...@@ -76,9 +76,9 @@ snapshots['test_first 1'] = {
'node': { 'node': {
'extra': None, 'extra': None,
'firstName': 'Spongebob', 'firstName': 'Spongebob',
'hasCollidingName': False,
'id': 'QXV0aG9yOjI=', 'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants', 'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
} }
...@@ -103,9 +103,9 @@ snapshots['test_first_after 1'] = { ...@@ -103,9 +103,9 @@ snapshots['test_first_after 1'] = {
'node': { 'node': {
'extra': None, 'extra': None,
'firstName': 'Spongebob', 'firstName': 'Spongebob',
'hasCollidingName': False,
'id': 'QXV0aG9yOjI=', 'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants', 'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
} }
...@@ -147,9 +147,9 @@ snapshots['test_last_before 1'] = { ...@@ -147,9 +147,9 @@ snapshots['test_last_before 1'] = {
'node': { 'node': {
'extra': None, 'extra': None,
'firstName': 'Spongebob', 'firstName': 'Spongebob',
'hasCollidingName': False,
'id': 'QXV0aG9yOjI=', 'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants', 'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
} }
...@@ -173,9 +173,9 @@ snapshots['test_with_reports 1'] = { ...@@ -173,9 +173,9 @@ snapshots['test_with_reports 1'] = {
'node': { 'node': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'reports': { 'reports': {
'edges': [ 'edges': [
{ {
......
...@@ -21,9 +21,9 @@ snapshots['test_author 1'] = { ...@@ -21,9 +21,9 @@ snapshots['test_author 1'] = {
'node': { 'node': {
'extra': '{"x": 1}', 'extra': '{"x": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjU=', 'id': 'QXV0aG9yOjU=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 0 'totalReports': 0
} }
} }
...@@ -41,9 +41,9 @@ snapshots['test_report 1'] = { ...@@ -41,9 +41,9 @@ snapshots['test_report 1'] = {
'author': { 'author': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 1 'totalReports': 1
}, },
'body': 'Long story short: we got the Ring!', 'body': 'Long story short: we got the Ring!',
...@@ -77,10 +77,10 @@ snapshots['test_user 1'] = { ...@@ -77,10 +77,10 @@ snapshots['test_user 1'] = {
'node': { 'node': {
'extra': '{"e": "mc2"}', 'extra': '{"e": "mc2"}',
'firstName': 'Albert', 'firstName': 'Albert',
'hasCollidingName': False,
'id': 'VXNlcjo4', 'id': 'VXNlcjo4',
'isAuthor': False, 'isAuthor': False,
'lastName': 'Einstein', 'lastName': 'Einstein',
'nameCollisionId': 0,
'openidUid': 'albert@einstein.id' 'openidUid': 'albert@einstein.id'
} }
} }
......
...@@ -17,9 +17,9 @@ snapshots['test_all 1'] = { ...@@ -17,9 +17,9 @@ snapshots['test_all 1'] = {
'author': { 'author': {
'extra': None, 'extra': None,
'firstName': 'Spongebob', 'firstName': 'Spongebob',
'hasCollidingName': False,
'id': 'QXV0aG9yOjI=', 'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants', 'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 1 'totalReports': 1
}, },
'body': 'Another long story.', 'body': 'Another long story.',
...@@ -40,9 +40,9 @@ snapshots['test_all 1'] = { ...@@ -40,9 +40,9 @@ snapshots['test_all 1'] = {
'author': { 'author': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2 'totalReports': 2
}, },
'body': 'Aragorn is the King. And we have lost the Ring.', 'body': 'Aragorn is the King. And we have lost the Ring.',
...@@ -63,9 +63,9 @@ snapshots['test_all 1'] = { ...@@ -63,9 +63,9 @@ snapshots['test_all 1'] = {
'author': { 'author': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2 'totalReports': 2
}, },
'body': 'Long story short: we got the Ring!', 'body': 'Long story short: we got the Ring!',
...@@ -102,9 +102,9 @@ snapshots['test_query 1'] = { ...@@ -102,9 +102,9 @@ snapshots['test_query 1'] = {
'author': { 'author': {
'extra': None, 'extra': None,
'firstName': 'Spongebob', 'firstName': 'Spongebob',
'hasCollidingName': False,
'id': 'QXV0aG9yOjI=', 'id': 'QXV0aG9yOjI=',
'lastName': 'Squarepants', 'lastName': 'Squarepants',
'nameCollisionId': 0,
'totalReports': 1 'totalReports': 1
}, },
'body': 'Another long story.', 'body': 'Another long story.',
...@@ -135,9 +135,9 @@ snapshots['test_highlight 1'] = { ...@@ -135,9 +135,9 @@ snapshots['test_highlight 1'] = {
'author': { 'author': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2 'totalReports': 2
}, },
'body': 'Aragorn is the King. And we have lost the <mark>Ring</mark>.', 'body': 'Aragorn is the King. And we have lost the <mark>Ring</mark>.',
...@@ -158,9 +158,9 @@ snapshots['test_highlight 1'] = { ...@@ -158,9 +158,9 @@ snapshots['test_highlight 1'] = {
'author': { 'author': {
'extra': '{"movies": 1}', 'extra': '{"movies": 1}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'QXV0aG9yOjE=', 'id': 'QXV0aG9yOjE=',
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'totalReports': 2 'totalReports': 2
}, },
'body': 'Long story short: we got the <mark>Ring</mark>!', 'body': 'Long story short: we got the <mark>Ring</mark>!',
......
...@@ -19,10 +19,10 @@ snapshots['test_authenticated 1'] = { ...@@ -19,10 +19,10 @@ snapshots['test_authenticated 1'] = {
'email': 'winston@wolfe.com', 'email': 'winston@wolfe.com',
'extra': '{"caliber": 45}', 'extra': '{"caliber": 45}',
'firstName': 'Winston', 'firstName': 'Winston',
'hasCollidingName': False,
'id': 'VXNlcjox', 'id': 'VXNlcjox',
'isAuthor': True, 'isAuthor': True,
'lastName': 'Wolfe', 'lastName': 'Wolfe',
'nameCollisionId': 0,
'openidUid': 'TheWolf' 'openidUid': 'TheWolf'
} }
} }
......
...@@ -21,7 +21,7 @@ def test_all(client, snapshot): ...@@ -21,7 +21,7 @@ def test_all(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -50,7 +50,7 @@ def test_first(client, snapshot): ...@@ -50,7 +50,7 @@ def test_first(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -79,7 +79,7 @@ def test_first_after(client, snapshot): ...@@ -79,7 +79,7 @@ def test_first_after(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -108,7 +108,7 @@ def test_last(client, snapshot): ...@@ -108,7 +108,7 @@ def test_last(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -137,7 +137,7 @@ def test_last_before(client, snapshot): ...@@ -137,7 +137,7 @@ def test_last_before(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -164,7 +164,7 @@ def test_with_reports(client, snapshot): ...@@ -164,7 +164,7 @@ def test_with_reports(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
reports { reports {
......
...@@ -41,7 +41,7 @@ def test_author(client, snapshot): ...@@ -41,7 +41,7 @@ def test_author(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
}} }}
...@@ -85,7 +85,7 @@ def test_report(client, snapshot): ...@@ -85,7 +85,7 @@ def test_report(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
}} }}
...@@ -106,7 +106,7 @@ def test_user__unauthorized(client, snapshot): ...@@ -106,7 +106,7 @@ def test_user__unauthorized(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
openidUid openidUid
isAuthor isAuthor
extra extra
...@@ -130,7 +130,7 @@ def test_user__not_a_viewer(client, snapshot): ...@@ -130,7 +130,7 @@ def test_user__not_a_viewer(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
openidUid openidUid
isAuthor isAuthor
extra extra
...@@ -152,7 +152,7 @@ def test_user(client, snapshot): ...@@ -152,7 +152,7 @@ def test_user(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
openidUid openidUid
isAuthor isAuthor
extra extra
......
...@@ -29,7 +29,7 @@ def test_all(client, snapshot): ...@@ -29,7 +29,7 @@ def test_all(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -70,7 +70,7 @@ def test_query(client, snapshot): ...@@ -70,7 +70,7 @@ def test_query(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
...@@ -105,7 +105,7 @@ def test_highlight(client, snapshot): ...@@ -105,7 +105,7 @@ def test_highlight(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
totalReports totalReports
extra extra
} }
......
...@@ -34,7 +34,7 @@ def test_authenticated(client, snapshot): ...@@ -34,7 +34,7 @@ def test_authenticated(client, snapshot):
id id
firstName firstName
lastName lastName
nameCollisionId hasCollidingName
email email
openidUid openidUid
isAuthor isAuthor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment