Add missing platform in query and add nullable as a safety

This commit is contained in:
Stuart Pomeroy 2023-05-07 18:38:19 +01:00 committed by MiniDigger | Martin
parent d1ff0a7de2
commit 1b7f315429
2 changed files with 3 additions and 2 deletions

View File

@ -178,6 +178,7 @@ public interface VersionsApiDAO {
" pvd.name," +
" pvd.required," +
" pvd.external_url," +
" pvd.platform," +
" p.owner_name pn_owner," +
" p.slug pn_slug" +
" FROM project_version_dependencies pvd" +

View File

@ -22,7 +22,7 @@ public class PluginDependency implements Named {
@JdbiConstructor
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public PluginDependency(final @Nullable String name, final boolean required, @Nested("pn") final @Nullable ProjectNamespace namespace, final String externalUrl, final Platform platform) {
public PluginDependency(final @Nullable String name, final boolean required, @Nested("pn") final @Nullable ProjectNamespace namespace, final String externalUrl, final @Nullable Platform platform) {
this.name = namespace != null ? null : name;
this.required = required;
this.namespace = namespace;
@ -55,7 +55,7 @@ public class PluginDependency implements Named {
return this.externalUrl;
}
public Platform getPlatform(){ return this.platform; }
public @Nullable Platform getPlatform(){ return this.platform; }
@Override
public String toString() {