Procházet zdrojové kódy

Merge pull request #4893 from pixelfed/staging

Update TransformImports command, fix import service condition
daniel před 1 rokem
rodič
revize
3d5fd48a22
2 změnil soubory, kde provedl 6 přidání a 0 odebrání
  1. 1 0
      CHANGELOG.md
  2. 5 0
      app/Console/Commands/TransformImports.php

+ 1 - 0
CHANGELOG.md

@@ -92,6 +92,7 @@
 - Update LoginController, fix captcha validation error message ([0325e171](https://github.com/pixelfed/pixelfed/commit/0325e171))
 - Update ApiV1Controller, properly cast boolean sensitive parameter. Fixes #4888 ([0aff126a](https://github.com/pixelfed/pixelfed/commit/0aff126a))
 - Update AccountImport.vue, fix new IG export format ([59aa6a4b](https://github.com/pixelfed/pixelfed/commit/59aa6a4b))
+- Update TransformImports command, fix import service condition ([32c59f04](https://github.com/pixelfed/pixelfed/commit/32c59f04))
 -  ([](https://github.com/pixelfed/pixelfed/commit/))
 
 ## [v0.11.9 (2023-08-21)](https://github.com/pixelfed/pixelfed/compare/v0.11.8...v0.11.9)

+ 5 - 0
app/Console/Commands/TransformImports.php

@@ -70,6 +70,11 @@ class TransformImports extends Command
             }
 
             $idk = ImportService::getId($ip->user_id, $ip->creation_year, $ip->creation_month, $ip->creation_day);
+            if(!$idk) {
+                $ip->skip_missing_media = true;
+                $ip->save();
+                continue;
+            }
 
             if(Storage::exists('imports/' . $id . '/' . $ip->filename) === false) {
                 ImportService::clearAttempts($profile->id);