From a23f7bdffe4e24538f1303bdbbebd8989aafcc0e Mon Sep 17 00:00:00 2001
From: dcz <dcz@ipipan.waw.pl>
Date: Tue, 29 Aug 2023 09:37:44 +0200
Subject: [PATCH] Remove lemma from roles available to assign.

---
 entries/views.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/entries/views.py b/entries/views.py
index a6bacc6..de61bf4 100644
--- a/entries/views.py
+++ b/entries/views.py
@@ -1026,7 +1026,8 @@ def ajax_predefined_preferences(request):
 def ajax_roles(request):
     roles = []
     for role in SemanticRole.objects.order_by('priority'):
-       roles.append({"id": role.id, "role": role.role, "priority": role.priority, "color": role.color})
+        if role.role != 'Lemma':
+            roles.append({"id": role.id, "role": role.role, "priority": role.priority, "color": role.color})
 
     context = {
         'roles': roles,
@@ -1040,7 +1041,7 @@ def ajax_role_attributes(request):
     roleAttributes = []
     for roleAttribute in RoleAttribute.objects.order_by('priority'):
         roleAttributes.append({"id": roleAttribute.id, "attribute": roleAttribute.attribute,
-                               "priority": roleAttribute.priority, "gradient": roleAttribute.gradient})
+                                   "priority": roleAttribute.priority, "gradient": roleAttribute.gradient})
 
     context = {
         'role_attributes': roleAttributes,
-- 
GitLab