mirror of https://github.com/zulip/zulip.git
a276603766
If there are more than 1 room with the same set of users, the import will fail due to a unique constraint on the huddle_hash. Figuring out why and which room is causing this database error is kinda difficult. We deduplicate those cases here and simply merge the rooms together. Note however, that the deduplication does not work as expected so we simply ignore them all together for now and only raise an exception along some logging output. At least this way, it is pretty clear what is wrong and you do not have to wait to get a database error during the actual import. We also ignore empty huddle rooms since those are the duplicates that caused problems for me and if they are empty, ignoring them is easier than trying to get the merge to work. Not sure where those channels come from since we discovered this with production data. Signed-off-by: Florian Pritz <bluewind@xinu.at> |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
openapi | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |