fix addMeta deadine

This commit is contained in:
xiaomlove
2022-10-10 01:36:35 +08:00
parent 3e03e78aa0
commit 0bdfc73528
3 changed files with 21 additions and 8 deletions

View File

@@ -278,11 +278,6 @@ class UserProfile extends ViewRecord
->action(function ($data) {
$rep = $this->getRep();
try {
if (!empty($data['duration'])) {
$data['deadline'] = now()->addDays($data['duration']);
} else {
$data['deadline'] = null;
}
$rep->addMeta($this->record, $data, $data);
$this->notify('success', 'Success!');
$this->emitSelf(self::EVENT_RECORD_UPDATED, $this->record->id);