⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Luke-Manyamazi
Copy link

@Luke-Manyamazi Luke-Manyamazi commented Nov 11, 2025

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

Changelist

Added validation in send_bloom() route to reject content exceeding 280 characters.
Updated bloom.py model to handle content truncation safely when inserting new blooms.
Added database cleanup step (SQL) to truncate existing blooms longer than 280 characters.
Improved error response messages for better feedback when validation fails.

Questions

None

@Luke-Manyamazi Luke-Manyamazi added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Legacy-Code The name of the module. labels Nov 11, 2025
Copy link
Member

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

This generally looks good! One extra note I have is that the number 280 is appearing in a lot of places in this code, so if you wanted to change it to 300 you'd need to change it in a lot of places - can you think how to reduce this duplication?

Comment on lines +21 to +22
if len(content) > 280:
content = content[:280] # truncate to 280 characters
Copy link
Member

Choose a reason for hiding this comment

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

Automatically truncating works (and you have endpoint-layer checks to make sure we shouldn't get here), but it's not clear whether at the DB layer we should truncate or reject - what do you think the trade-offs are here?

@illicitonion illicitonion added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Legacy-Code The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants