fix: Do not set patch fields if they are empty

This commit is contained in:
oSumAtrIX 2023-10-22 18:08:00 +02:00
parent 0447fa9c28
commit a76ac04214
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -65,7 +65,8 @@ sealed class Patch<out T : Context<*>> {
name = annotation.name.ifEmpty { null }
description = annotation.description.ifEmpty { null }
compatiblePackages = annotation.compatiblePackages
.map { CompatiblePackage(it.name, it.versions.toSet()) }.toSet()
.map { CompatiblePackage(it.name, it.versions.toSet().ifEmpty { null }) }
.toSet().ifEmpty { null }
dependencies = annotation.dependencies.toSet().ifEmpty { null }
use = annotation.use
requiresIntegrations = annotation.requiresIntegrations