Skip to content

Commit

Permalink
Merge pull request #53 from utopia-php/validate-uid
Browse files Browse the repository at this point in the history
validate UID fix
  • Loading branch information
abnegate committed Oct 9, 2024
1 parent 667997c commit 9f2d1af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Migration/Destinations/Appwrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected function createDatabase(Database $resource): bool

$validator = new UID();

if ($validator->isValid($resourceId)) {
if (!$validator->isValid($resourceId)) {
throw new Exception(
resourceName: $resource->getName(),
resourceGroup: $resource->getGroup(),
Expand Down Expand Up @@ -368,7 +368,7 @@ protected function createCollection(Collection $resource): bool

$validator = new UID();

if ($validator->isValid($resourceId)) {
if (!$validator->isValid($resourceId)) {
throw new Exception(
resourceName: $resource->getName(),
resourceGroup: $resource->getGroup(),
Expand Down Expand Up @@ -895,7 +895,7 @@ protected function createDocument(Document $resource, bool $isLast): bool
{
$validator = new UID();

if ($validator->isValid($resource->getId())) {
if (!$validator->isValid($resource->getId())) {
throw new Exception(
resourceName: $resource->getName(),
resourceGroup: $resource->getGroup(),
Expand Down

0 comments on commit 9f2d1af

Please sign in to comment.