Skip to content

A free open source IT asset/license management system

Whoops, used PHP's equal signs instead of MySQL's :/

Brady Wetheringtonc6c0a14ee09f
diff --git a/app/Rules/UniqueUndeleted.php b/app/Rules/UniqueUndeleted.php
index 9aceae5a73..e53274ea8d 100644
--- a/app/Rules/UniqueUndeleted.php
+++ b/app/Rules/UniqueUndeleted.php
@@ -42,11 +42,11 @@ class UniqueUndeleted implements ValidationRule, ValidatorAwareRule
public function validate(string $attribute, mixed $value, Closure $fail): void
{
$query = DB::table($this->table)->whereNull('deleted_at');
- $query->where($this->columns[0], '==', $value); //the first column to check
+ $query->where($this->columns[0], '=', $value); //the first column to check
$translation_string = 'validation.unique_undeleted'; //the normal validation string for a single-column check
foreach (array_slice($this->columns, 1) as $column) {
$translation_string = 'validation.two_column_unique_undeleted';
- $query->where($column, '==', $this->data[$column]);
+ $query->where($column, '=', $this->data[$column]);
}
if ($query->count() > 0) {