Check item validity when creating on an actor

This commit is contained in:
Carlos Fernandez 2025-12-02 05:16:56 -05:00
parent 11fbb4cce8
commit 4aca29d6c2
5 changed files with 23 additions and 0 deletions

View file

@ -141,6 +141,10 @@ export default class DhpAdversary extends BaseDataActor {
return this.parent.items.filter(x => x.type === 'feature');
}
isItemValid(source) {
return source.type === "feature";
}
async _preUpdate(changes, options, user) {
const allowed = await super._preUpdate(changes, options, user);
if (allowed === false) return false;