Check if contain module id (#1128)
This commit is contained in:
@@ -663,7 +663,7 @@ fn _list_modules(path: &str) -> Vec<HashMap<String, String>> {
|
||||
module_prop_map.insert(k, v);
|
||||
});
|
||||
|
||||
if module_prop_map["id"].is_empty() {
|
||||
if !module_prop_map.contains_key("id") || module_prop_map["id"].is_empty() {
|
||||
if let Some(id) = entry.file_name().to_str() {
|
||||
info!("Use dir name as module id: {}", id);
|
||||
module_prop_map.insert("id".to_owned(), id.to_owned());
|
||||
|
||||
Reference in New Issue
Block a user