[PR #1818] [MERGED] Catch errors in load_initial_data command #2302

Closed
opened 2026-02-27 12:10:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/modoboa/modoboa/pull/1818
Author: @jeromelebleu
Created: 1/7/2020
Status: Merged
Merged: 1/13/2020
Merged by: @tonioo

Base: masterHead: load_initial_data


📝 Commits (1)

  • c30bc31 core: catch errors in load_initial_data command

📊 Changes

4 files changed (+36 additions, -7 deletions)

View changed files

📝 modoboa/core/management/commands/load_initial_data.py (+12 -3)
📝 modoboa/core/tests/stupid_extension_1/modo_extension.py (+3 -1)
📝 modoboa/core/tests/stupid_extension_2/modo_extension.py (+3 -0)
📝 modoboa/core/tests/test_extensions.py (+18 -3)

📄 Description

Current behavior before PR

While executing load_initial_data command, an exception raised by an extension is not handled. As a result, the user could have difficulties to know what happened but also the command stops and the data of the other extensions will not be loaded - except with PostgreSQL database where no data at all will be loaded.

Desired behavior after PR is merged

An error is displayed to tell that the extension data could not be initialized, and the process continues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/modoboa/modoboa/pull/1818 **Author:** [@jeromelebleu](https://github.com/jeromelebleu) **Created:** 1/7/2020 **Status:** ✅ Merged **Merged:** 1/13/2020 **Merged by:** [@tonioo](https://github.com/tonioo) **Base:** `master` ← **Head:** `load_initial_data` --- ### 📝 Commits (1) - [`c30bc31`](https://github.com/modoboa/modoboa/commit/c30bc3174b7476f1e1832ba57a59b5cb506402d7) core: catch errors in load_initial_data command ### 📊 Changes **4 files changed** (+36 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `modoboa/core/management/commands/load_initial_data.py` (+12 -3) 📝 `modoboa/core/tests/stupid_extension_1/modo_extension.py` (+3 -1) 📝 `modoboa/core/tests/stupid_extension_2/modo_extension.py` (+3 -0) 📝 `modoboa/core/tests/test_extensions.py` (+18 -3) </details> ### 📄 Description #### Current behavior before PR While executing `load_initial_data` command, an exception raised by an extension is not handled. As a result, the user could have difficulties to know what happened but also the command stops and the data of the other extensions will not be loaded - except with PostgreSQL database where no data at all will be loaded. #### Desired behavior after PR is merged An error is displayed to tell that the extension data could not be initialized, and the process continues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 12:10:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#2302
No description provided.