Skip to content

Conversation

@rohan-chaturvedi
Copy link
Member

@rohan-chaturvedi rohan-chaturvedi commented Oct 13, 2025

🔍 Overview

Fixed the ApolloError: {'expires_at': ['This field cannot be blank.']} when creating Service Account Tokens that do not expire.

💡 Proposed Changes

Replace the unnecessary full_clean() call with just clean() on model save() to run our custom validation logic

💚 Did You...

  • Ensure linting passes (code style checks)?
    - [ ] Update dependencies and lockfiles (if required)
    - [ ] Update migrations (if required)
    - [ ] Regenerate graphql schema and types (if required)
  • Verify the app builds locally?
  • Manually test the changes on different browsers/devices?

Note

Replace full_clean() with clean() in ServiceAccountToken.save to run custom validation only.

  • Backend – Models (backend/api/models.py):
    • Update ServiceAccountToken.save to call clean() instead of full_clean().

Written by Cursor Bugbot for commit c53c971. This will update automatically on new commits. Configure here.

Signed-off-by: rohan <rohan.chaturvedi@protonmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an ApolloError when creating Service Account Tokens that do not expire by replacing full_clean() with clean() in the ServiceAccountToken model's save method.

  • Replaced full_clean() with clean() in the save method to avoid unnecessary field validation
  • Prevents the error "This field cannot be blank" for expires_at when creating non-expiring tokens

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nimish-ks
Copy link
Member

@cursor review

@nimish-ks nimish-ks merged commit 7eecbce into main Oct 13, 2025
8 checks passed
@nimish-ks nimish-ks deleted the fix--service-account-token-model-clean branch October 13, 2025 17:52
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.

3 participants