mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-27 06:01:08 +08:00
Add missing platform in query and add nullable as a safety
This commit is contained in:
parent
d1ff0a7de2
commit
1b7f315429
@ -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" +
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user