Skip to content

Commit

Permalink
Merge pull request #1213 from myrix/heavy_refactor
Browse files Browse the repository at this point in the history
link entities from the administrator are automatically published
  • Loading branch information
myrix authored Nov 4, 2019
2 parents 50d6714 + df9e407 commit 9a386d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lingvodoc/schema/gql_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def mutate(root, info, **args):
# If the entity is being created by the admin, we automatically publish it.

if user.id == 1:
dbentity.publishingentity.published = True
dbentity.publishingentity.published = True

filename = args.get('filename')
real_location = None
Expand Down
6 changes: 6 additions & 0 deletions lingvodoc/schema/gql_lexicalentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ def mutate(root, info, **args):
dbBaseGroup.action == 'create').one()
if user.is_active and user in group.users:
tag_entity.publishingentity.accepted = True

# If we are the admin, we automatically publish link entities.

if user.id == 1:
tag_entity.publishingentity.published = True

return ConnectLexicalEntries(triumph=True)


Expand Down

0 comments on commit 9a386d1

Please sign in to comment.