Skip to content

Commit

Permalink
sanity check on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Jul 19, 2024
1 parent d8289e8 commit e1aeed0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion community/models/pending_posts.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ do
if _class_0.__parent.__base.delete(self) then
db.delete(ActivityLogs:table_name(), {
object_type = assert(ActivityLogs.object_types.pending_post),
object_id = self.id
object_id = assert(self.id)
})
return true
end
Expand Down
2 changes: 1 addition & 1 deletion community/models/pending_posts.moon
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PendingPosts extends Model
if super!
db.delete ActivityLogs\table_name!, {
object_type: assert ActivityLogs.object_types.pending_post
object_id: @id
object_id: assert @id
}
true

Expand Down

0 comments on commit e1aeed0

Please sign in to comment.