summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-08-03 17:31:29 -0700
committerAndrew Morgan <andrew@amorgan.xyz>2020-08-03 17:31:29 -0700
commitdd659047f57541cdabddd42d0ef6a2f9721bbf93 (patch)
treebb03e520c8eaa83b1c220ccac0772165f371a1af
parentMerge commit '85223106f' into anoa/dinsic_release_1_18_x (diff)
parentFix bug in per-room message retention policies. (#7850) (diff)
downloadsynapse-dd659047f57541cdabddd42d0ef6a2f9721bbf93.tar.xz
Merge commit '8d0097bef' into anoa/dinsic_release_1_18_x
* commit '8d0097bef':
  Fix bug in per-room message retention policies. (#7850)
-rw-r--r--changelog.d/7850.bugfix1
-rw-r--r--synapse/storage/data_stores/main/room.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/7850.bugfix b/changelog.d/7850.bugfix
new file mode 100644

index 0000000000..5f19a89043 --- /dev/null +++ b/changelog.d/7850.bugfix
@@ -0,0 +1 @@ +Fix "AttributeError: 'str' object has no attribute 'get'" error message when applying per-room message retention policies. The bug was introduced in Synapse 1.7.0. diff --git a/synapse/storage/data_stores/main/room.py b/synapse/storage/data_stores/main/room.py
index 7f8ca19e87..47f98ba421 100644 --- a/synapse/storage/data_stores/main/room.py +++ b/synapse/storage/data_stores/main/room.py
@@ -939,7 +939,7 @@ class RoomBackgroundUpdateStore(SQLBaseStore): retention_policy = {} else: ev = json.loads(row["json"]) - retention_policy = json.dumps(ev["content"]) + retention_policy = ev["content"] self.db.simple_insert_txn( txn=txn,