Commit 489b1ce
authored
get_last_entries_from_db: double json decode (ansible#258)
* get_last_entries_from_db: double json decode
the settings model json-encodes everything when saving to the db,
but we're already passing it a json.dumps output
that's how it works for a while now, not changing that,
but updating the parser to cope with the double json
and updating mock db accordingly
Fixes:
File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/metrics_utility/base/collector.py", line 155, in last_gathered_entry_for
return self.last_gathered_entries.get(key)', ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^', "AttributeError: 'str' object has no attribute 'get'
* adjust test accordingly1 parent 7ef1628 commit 489b1ce
File tree
3 files changed
+6
-4
lines changed- metrics_utility
- automation_controller_billing
- test
- tools/docker
3 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
0 commit comments