Skip to content

Alicia Wynona Tjahjadi | Oct2025-1 | Module-Legacy-Code | Sprint-1 | Purple Forest: Bug Report: Extra long blooms? - #2

Open
aliciawt wants to merge 1 commit into
mainfrom
fix/extra-long/blooms
Open

Alicia Wynona Tjahjadi | Oct2025-1 | Module-Legacy-Code | Sprint-1 | Purple Forest: Bug Report: Extra long blooms?#2
aliciawt wants to merge 1 commit into
mainfrom
fix/extra-long/blooms

Conversation

@aliciawt

Copy link
Copy Markdown
Owner

Fix: Extra long blooms exceeding 280 character limit

Problem

Blooms are meant to be limited to 280 characters, but user "AS" had a bloom with 375 characters.

Root Cause

  • Backend send_bloom() endpoint had no length validation
  • Database had no constraint on bloom length
  • Sample data contained a bloom exceeding the limit (AS's 375-character bloom)

Solution

  • Added length validation (max 280 chars) to send_bloom() endpoint in backend/endpoints.py
  • Returns 400 error with clear message if bloom exceeds 280 characters
  • Truncated AS's existing long bloom from 375 to 280 characters

Testing

  • Cannot post bloom longer than 280 characters
  • Can post bloom with exactly 280 characters
  • Can post bloom with less than 280 characters
  • AS's bloom now shows correctly with proper length
  • All existing blooms are within the 280 character limit

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.

1 participant