Skip to content

Commit bdd237f

Browse files
authored
[HOTFIX][FE] Helpers: Set generic UUID when database connection are not handled (#285)
2 parents 029d0ed + 6af5515 commit bdd237f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: app/Helpers/AppHelper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function getCurrentTimeZone() {
3636
}
3737

3838
function generateUniqueUuid($customModel, $customColumn) {
39-
if (appLogModel::count() >= 1) {
39+
try {
4040
if ($customColumn !== 'processId') {
4141
do {
4242
$uniqueID = Uuid::uuid4();
@@ -58,7 +58,7 @@ function generateUniqueUuid($customModel, $customColumn) {
5858
watermarkModel::where($customColumn, $uniqueID)->exists()
5959
);
6060
}
61-
} else {
61+
} catch (\Exception $e) {
6262
$uniqueID = Uuid::uuid4();
6363
}
6464
return $uniqueID->toString();

0 commit comments

Comments
 (0)