Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Company Registration Process #2408

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

JisanAR03
Copy link
Contributor

Overview

This PR improves the robustness, performance, and maintainability of the RegisterCompanyView by introducing the following key changes:

  1. Atomic Transactions: Ensures all database operations for company creation are atomic, preventing partial updates and ensuring consistency.
  2. Enhanced File Handling: Adds UUIDs to filenames, checks for the presence of the logo file before saving, and ensures proper cleanup on errors.
  3. Improved Error Handling: Provides better error feedback and maintains a clean state by handling specific exceptions and deleting files if necessary.
  4. Optimized Manager Assignment: Moves manager filtering and assignment inside the transaction block to optimize performance and avoid unnecessary queries.
  5. Validation of Optional Fields: Handles optional fields more gracefully to avoid errors and improve robustness.

These changes ensure that the company registration process is more reliable and efficient.

@DonnieBLT , @arkid15r , this PR is another commit for "company dashboard project"

@JisanAR03 JisanAR03 merged commit aefd23f into OWASP-BLT:main Jul 8, 2024
8 checks passed
@JisanAR03 JisanAR03 mentioned this pull request Jul 8, 2024
@JisanAR03 JisanAR03 deleted the company_login_feature branch July 9, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants