File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
readthedocs/notifications Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -46,12 +46,18 @@ def _escape_format_values(self, format_values):
46
46
If we want to support other types or nested dictionaries,
47
47
we will need to iterate recursively to apply the ``escape`` function.
48
48
"""
49
- return {
49
+ result = {
50
50
key : escape (value )
51
51
for key , value in format_values .items ()
52
52
if isinstance (value , (str , int ))
53
53
}
54
54
55
+ # TODO: improve this code; I need to hotfix it for now.
56
+ # We need to keep passing the "instance" that comes from the notification object itself.
57
+ if "instance" in format_values :
58
+ result ["instance" ] = format_values ["instance" ]
59
+ return result
60
+
55
61
def set_format_values (self , format_values ):
56
62
self .format_values = self ._escape_format_values (format_values )
57
63
You can’t perform that action at this time.
0 commit comments