Commit graph

6 commits

Author SHA1 Message Date
Ashwin
bd79a7a4cc Refactor code style and improve error handling in analytics API
- Cleaned up admin.py by removing unnecessary dictionary wrapping for fields.
- Adjusted migration files to maintain consistent formatting and removed redundant lines.
- Updated models.py and tests to remove unnecessary blank lines and improve readability.
- Enhanced error handling in the analytics API to properly forward upstream status and messages.
- Added comprehensive tests for the analytics proxy to ensure correct status and body forwarding.
- Updated contributing guidelines to clarify the use of ruff for code style enforcement.
2026-08-07 15:58:35 +05:30
Ashwin
0e6d880187 Add tests for client links and attachment deletion authorization
- Introduced tests for frontend URL generation in `test_client_links.py` to ensure all links in emails are reachable and correctly formatted.
- Added authorization tests for deleting attachments in `test_attachment_delete_authz.py` for leads and opportunities, ensuring proper access control based on user roles and organization boundaries.
- Updated `LeadAttachmentView` and `OpportunityAttachmentView` to use `get_scoped_or_404` for safer object retrieval, preventing unauthorized access to attachments across organizations.
- Improved documentation regarding the organization API key and personal access tokens, clarifying their scopes and security implications.
- Enhanced frontend token management to support new scope enforcement, allowing users to specify access levels when creating tokens.
2026-08-05 07:02:40 +05:30
ashwin31
687fd9244f fix: resolve 222 Prospector static analysis issues across backend
- Fix missing `import json` in leads and opportunity views (runtime bugs)
- Remove ~60 unused imports across 30+ files
- Remove unused variables and dead code assignments
- Convert f-string logging to lazy % formatting (41 instances)
- Chain exceptions with `from exc` for proper tracebacks
- Replace mutable default arguments with None guards
- Fix invalid escape sequences, set comprehensions, f-strings
- Remove unnecessary else/elif after return/raise/continue
- Modernize: super() without args, remove object inheritance
- Replace wildcard import with explicit imports in contacts/views
- Fix wrong-import-position in invoices and auth views
- Add noqa comments for intentional side-effect imports
- Add encoding parameter to open() call
- Fix renamed parameter in serializer validate override

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 14:00:19 +05:30
Ashwin
975aa4b31c feat: Add invoicing feature implementation plan, improve security logging, and enable CSRF protection. 2025-12-08 08:52:00 +05:30
Ashwin Kumar
c2b29afdf8
1.0 (#567)
1.0
2025-12-06 23:10:54 +05:30
Ashwin Kumar
fc05248c28
revamp and upgrade to modern stack (#562)
revamp and upgrade to modern stack
2025-11-29 10:07:50 +05:30
Renamed from common/external_auth.py (Browse further)