Skip to content

Commit 44c53c8

Browse files
author
Jongmin Kim
authored
Merge pull request #68 from whdalsrnt/master
fix: fix a field_group key bug
2 parents 91c4dbf + 34864ee commit 44c53c8

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/spaceone/core/model/mongo_model/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,14 +1074,19 @@ def _check_condition(cls, condition):
10741074
def _make_field_group_keys(cls, group_keys, field_group):
10751075
field_group_keys = []
10761076
for group_key in group_keys:
1077-
if group_key['name'] not in field_group:
1078-
if group_key['name'] == 'date':
1077+
key = group_key['key'].rsplit('.', 1)[-1:][0]
1078+
name = group_key['name']
1079+
if name not in field_group:
1080+
if name == 'date':
10791081
field_group_keys.append({
10801082
'key': 'date',
10811083
'name': 'date'
10821084
})
10831085
else:
1084-
field_group_keys.append(group_key)
1086+
field_group_keys.append({
1087+
'key': key,
1088+
'name': name
1089+
})
10851090

10861091
return field_group_keys
10871092

0 commit comments

Comments
 (0)