Fixed update of module groups
Module groups should not be rewritten completely when reading from default data. Also made project type search case insensitive. Change-Id: I41b8799a63669b16362bb6792a399bbef753938d
This commit is contained in:
parent
59b570dc7b
commit
1f3606224c
@ -165,6 +165,7 @@ def is_project_type_valid(project_type):
|
||||
|
||||
|
||||
def get_project_type(project_type_id):
|
||||
project_type_id = project_type_id.lower()
|
||||
if not is_project_type_valid(project_type_id):
|
||||
return None
|
||||
return get_vault()['project_types_index'][project_type_id]
|
||||
@ -187,6 +188,7 @@ def resolve_modules(module_ids):
|
||||
def resolve_project_types(project_types):
|
||||
modules = set()
|
||||
for pt in project_types:
|
||||
pt = pt.lower()
|
||||
if is_project_type_valid(pt):
|
||||
modules |= resolve_modules(
|
||||
get_vault()['project_types_index'][pt]['modules'])
|
||||
|
@ -131,8 +131,10 @@ def _store_companies(runtime_storage_inst, companies):
|
||||
|
||||
|
||||
def _store_module_groups(runtime_storage_inst, module_groups):
|
||||
mg_set = dict([(mg['module_group_name'], mg) for mg in module_groups])
|
||||
runtime_storage_inst.set_by_key('module_groups', mg_set)
|
||||
stored_mg = runtime_storage_inst.get_by_key('module_groups') or {}
|
||||
for mg in module_groups:
|
||||
stored_mg[mg['module_group_name']] = mg
|
||||
runtime_storage_inst.set_by_key('module_groups', stored_mg)
|
||||
|
||||
|
||||
STORE_FUNCS = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user