mirror of
https://github.com/friendica/friendica
synced 2025-04-27 06:30:12 +00:00
Avoid some database errors
This commit is contained in:
parent
4e3102bfb3
commit
15d975f143
3 changed files with 5 additions and 2 deletions
|
@ -251,7 +251,7 @@ class Notification extends BaseRepository
|
|||
$this->db->update(self::$table_name, $fields, ['id' => $Notification->id]);
|
||||
} else {
|
||||
$fields['created'] = DateTimeFormat::utcNow();
|
||||
$this->db->insert(self::$table_name, $fields);
|
||||
$this->db->insert(self::$table_name, $fields, Database::INSERT_IGNORE);
|
||||
|
||||
$Notification = $this->selectOneById($this->db->lastInsertId());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue