Skip to content

Comments

Manchester | 25-SDC-Nov | Rahwa Haile | Sprint 1 | Bug Report: Extra long blooms?#143

Open
RahwaZeslusHaile wants to merge 1 commit intoCodeYourFuture:mainfrom
RahwaZeslusHaile:extra-bloom
Open

Manchester | 25-SDC-Nov | Rahwa Haile | Sprint 1 | Bug Report: Extra long blooms?#143
RahwaZeslusHaile wants to merge 1 commit intoCodeYourFuture:mainfrom
RahwaZeslusHaile:extra-bloom

Conversation

@RahwaZeslusHaile
Copy link

Manchester | 25-SDC-Nov | Rahwa Haile | Sprint 1 | Bug Report: Extra long blooms?

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Fix: Enforce 280-character limit on blooms

Description

This PR fixes a bug where blooms could be posted with content exceeding the intended 280-character limit. The frontend enforces this limit via a textarea maxlength attribute, but the backend had no validation, allowing blooms to bypass the restriction.

Changes

  • backend/endpoints.py: Added validation to the send_bloom() endpoint to reject blooms longer than 280 characters with a 400 error response
  • backend/populate.py: Shortened AS's seed bloom from 332 to 253 characters to comply with the new limit

Why This Matters

  • Blooms are Twitter-inspired and should maintain the 280-character limit
  • Without backend validation, users could post oversized blooms via API calls
  • AS's seed data now complies with the limit, preventing populate script failures

Testing

  • Seed data populates successfully with the corrected bloom length
  • Backend validation prevents posting blooms > 280 characters
  • Existing shorter blooms are unaffected

Please review my work — thank you!

@RahwaZeslusHaile RahwaZeslusHaile added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 16, 2026
Copy link

@OracPrime OracPrime left a comment

Choose a reason for hiding this comment

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

Nice.

@OracPrime OracPrime added Reviewed Volunteer to add when completing a review with trainee action still to take. Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants