Files
duty-teller/utils/user.py
Nikolay Tatarinov 5331fac334 Add configuration rules, refactor settings management, and enhance import functionality
- Introduced a new configuration file `.cursorrules` to define coding standards, error handling, testing requirements, and project-specific guidelines.
- Refactored `config.py` to implement a `Settings` dataclass for better management of environment variables, improving testability and maintainability.
- Updated the import duty schedule handler to utilize session management with `session_scope`, ensuring proper database session handling.
- Enhanced the import service to streamline the duty schedule import process, improving code organization and readability.
- Added new service layer functions to encapsulate business logic related to group duty pinning and duty schedule imports.
- Updated README documentation to reflect the new configuration structure and improved import functionality.
2026-02-18 12:35:11 +03:00

9 lines
323 B
Python

"""User display name helpers."""
def build_full_name(first_name: str | None, last_name: str | None) -> str:
"""Build display full name from first and last name. Returns 'User' if both empty."""
parts = [first_name or "", last_name or ""]
full = " ".join(filter(None, parts)).strip()
return full or "User"