Skip to content

Commit 004a8c7

Browse files
committed
Merge branch 'main' into staging
# Conflicts: # schemas/tags.graphql
2 parents 65bcbc9 + 4aa7cb0 commit 004a8c7

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

db/postgres/mod.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func NewModQuery(ctx context.Context, filter *models.ModFilter, unapproved bool,
260260
}
261261
}
262262

263-
return query.Debug()
263+
return query
264264
}
265265

266266
func GetModByIDOrReference(ctx context.Context, modIDOrReference string) *Mod {

redis/jobs/consumers/consumer_scan_mod_on_virus_total.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ func ScanModOnVirusTotalConsumer(ctx context.Context, payload []byte) error {
3838
log.Info().Msgf("starting virus scan of mod %s version %s", task.ModID, task.VersionID)
3939

4040
version := postgres.GetVersion(ctx, task.VersionID)
41+
// Version got deleted?
42+
if version == nil {
43+
log.Error().Msgf("mod %s version %s does not exist to be scanned", task.ModID, task.VersionID)
44+
return nil
45+
}
46+
4147
link := storage.GenerateDownloadLink(version.Key)
4248

4349
response, _ := http.Get(link)

schemas/bootstrap_version.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extend type Query {
6767
### Mutations
6868

6969
extend type Mutation {
70-
createBootstrapVersion(bootstrapVersion: NewBootstrapVersion!): BootstrapVersion @isLoggedIn
70+
createBootstrapVersion(bootstrapVersion: NewBootstrapVersion!): BootstrapVersion @canEditBootstrapVersions @isLoggedIn
7171
updateBootstrapVersion(bootstrapVersionId: BootstrapVersionID!, bootstrapVersion: UpdateBootstrapVersion!): BootstrapVersion! @canEditBootstrapVersions @isLoggedIn
7272
deleteBootstrapVersion(bootstrapVersionId: BootstrapVersionID!): Boolean! @canEditBootstrapVersions @isLoggedIn
7373
}

schemas/sml_version.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ extend type Query {
9292
### Mutations
9393

9494
extend type Mutation {
95-
createSMLVersion(smlVersion: NewSMLVersion!): SMLVersion @isLoggedIn
95+
createSMLVersion(smlVersion: NewSMLVersion!): SMLVersion @canEditSMLVersions @isLoggedIn
9696
updateSMLVersion(smlVersionId: SMLVersionID!, smlVersion: UpdateSMLVersion!): SMLVersion! @canEditSMLVersions @isLoggedIn
9797
deleteSMLVersion(smlVersionId: SMLVersionID!): Boolean! @canEditSMLVersions @isLoggedIn
9898
}

0 commit comments

Comments
 (0)