Refactor Post and Post Comment models to strictly use Vision ID string pattern
Updated Post_Base and Post_Comment_Base to ensure integer IDs (post_id, post_comment_id) are explicitly removed during validation to prevent mixed-type ID collisions. This hardens the V3 Vision standard compliance.
This commit is contained in:
@@ -74,7 +74,7 @@ class Post_Comment_Base(BaseModel):
|
||||
values['user_id'] = u_rid
|
||||
|
||||
# 2. Prevent "Collision Population"
|
||||
for k in ['id', 'post_id', 'person_id', 'user_id']:
|
||||
for k in ['id', 'post_comment_id', 'post_id', 'person_id', 'user_id']:
|
||||
if k in values and not isinstance(values[k], str):
|
||||
del values[k]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user