Solution#1812
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there is a functional bug in your delete method that prevents deletions from being persisted to the database. Specifically, in app/managers.py, you reference self.connection.commit but never call it as a function (self.connection.commit()), so the delete operation can be rolled back or not applied, which violates the CRUD requirement that deletions be actually saved. To fix this, update the delete method so that after executing the DELETE statement you explicitly call self.connection.commit().
In addition, the flake8 linter reports several style issues (extra blank lines, trailing whitespace, and long lines) in app/managers.py and an unused import in app/models.py; while these are not functional blockers, they will need to be cleaned up to satisfy the project’s style checks. For example, remove any unused imports in models.py, trim trailing spaces, reduce multiple blank lines to one, and break overly long lines to under 79–80 characters. Once you add the missing commit call and clean up the linter issues, your implementation should fully meet the task’s requirements. Overall, your CRUD structure and method signatures look good; this is mainly about ensuring the delete operation is correctly committed and the code passes style checks.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: NCM]
If the issue is within your control, please address it.
The next review attempt will automatically launch in about 1 hour.
If you believe this is an error or need assistance, please contact the support team.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it fully meets the functional requirements and respects all checklist constraints. The Actor dataclass is correctly defined with id, first_name, and last_name, and the ActorManager in managers.py provides all required CRUD methods with the proper signatures and behavior. The manager’s __init__ correctly takes db_name and table_name, and initializes the SQLite connection and cursor inside the constructor as required. Each of create, update, and delete runs the appropriate SQL with parameterized queries and explicitly calls self.connection.commit(), ensuring data is persisted correctly. The all() method returns a list of Actor instances and naturally returns an empty list when there are no rows, which matches the specification. You also respected the checklist items: the class name is singular [CHECKLIST ITEM #1], the table name is not hardcoded and can be plural [CHECKLIST ITEM #2], and no database files are included in the submission [CHECKLIST ITEM #3]. Overall, your implementation is clean, correct, and aligned with the task requirements; keep this level of structure and clarity in future database manager tasks as well.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.