Mercurial > libervia-web
comparison libervia/pages/files/list/page_meta.py @ 1421:e065c8886b81
pages (files/list): set empty affiliations when they can't be retrieved
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 01 May 2021 19:04:25 +0200 |
parents | 6fc41f000d24 |
children | ce879da7fcf7 |
comparison
equal
deleted
inserted
replaced
1420:925a7c498cda | 1421:e065c8886b81 |
---|---|
123 f'that the location is new') | 123 f'that the location is new') |
124 # FIXME: Q&D handling of empty dir (e.g. new directory/photos album) | 124 # FIXME: Q&D handling of empty dir (e.g. new directory/photos album) |
125 affiliations = { | 125 affiliations = { |
126 session_data.jid.userhost(): "owner" | 126 session_data.jid.userhost(): "owner" |
127 } | 127 } |
128 if e.condition == "service-unavailable": | |
129 affiliations = {} | |
128 else: | 130 else: |
129 raise e | 131 raise e |
130 | 132 |
131 directory_affiliation = affiliations.get(session_data.jid.userhost()) | 133 directory_affiliation = affiliations.get(session_data.jid.userhost()) |
132 if directory_affiliation == "owner": | 134 if directory_affiliation == "owner": |