File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -806,16 +806,26 @@ def read_templates_and_groups():
806
806
configs = []
807
807
for config_file in pathlib .Path (annotation_templates_dir ).glob ('**/*.yml' ):
808
808
config = read_yaml (config_file )
809
+
810
+ if settings .VERSION_EDITION != 'Community' :
811
+ if config .get ('group' , '' ).lower () == 'Community Contributions' :
812
+ continue
813
+
809
814
if settings .VERSION_EDITION == 'Community' :
810
- if settings . VERSION_EDITION . lower () != config .get ('type' , 'community' ):
815
+ if config .get ('type' , 'community' ). lower () != 'community' :
811
816
continue
817
+
812
818
if config .get ('image' , '' ).startswith ('/static' ) and settings .HOSTNAME :
813
819
# if hostname set manually, create full image urls
814
820
config ['image' ] = settings .HOSTNAME + config ['image' ]
815
821
configs .append (config )
816
822
template_groups_file = find_file (os .path .join ('annotation_templates' , 'groups.txt' ))
817
823
with open (template_groups_file , encoding = 'utf-8' ) as f :
818
824
groups = f .read ().splitlines ()
825
+
826
+ if settings .VERSION_EDITION != 'Community' :
827
+ groups = [group for group in groups if group .lower () != 'Community Contributions' ]
828
+
819
829
logger .debug (f'{ len (configs )} templates found.' )
820
830
return {'templates' : configs , 'groups' : groups }
821
831
You can’t perform that action at this time.
0 commit comments