Merge pull request #301 from nextcloud/enh/noid/improve-update-check

also show up-to-date if the checks return null
This commit is contained in:
Simon L 2022-03-02 18:28:47 +01:00 committed by GitHub
commit 10f62ac401
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,7 @@ class DockerActionManager
$runningDigest = $this->GetRepoDigestOfContainer($container->GetIdentifier());
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($container->GetContainerName(), $tag);
if ($runningDigest === $remoteDigest) {
if ($runningDigest === $remoteDigest || $remoteDigest === null || $runningDigest === null) {
return new VersionEqualState();
} else {
return new VersionDifferentState();
@ -346,7 +346,7 @@ class DockerActionManager
$runningDigest = $this->GetRepoDigestOfContainer($containerName);
$remoteDigest = $this->dockerHubManager->GetLatestDigestOfTag($imageName, $tag);
if ($remoteDigest === $runningDigest) {
if ($remoteDigest === $runningDigest || $remoteDigest === null || $runningDigest === null) {
return false;
} else {
return true;