diff options
| author | 2025-03-17 15:06:17 +0100 | |
|---|---|---|
| committer | 2025-03-17 14:06:17 +0000 | |
| commit | d5847e2d2b68a1eb41d43be170cd4ddff9003cff (patch) | |
| tree | 7352e79110b081eb72d483358f5c07c8d34c29ff /internal/db/bundb/status.go | |
| parent | [feature/frontend] Add visibility icon for posts (#3908) (diff) | |
| download | gotosocial-d5847e2d2b68a1eb41d43be170cd4ddff9003cff.tar.xz | |
[feature] Application creation + management via API + settings panel (#3906)
* [feature] Application creation + management via API + settings panel
* fix docs links
* add errnorows test
* use known application as shorter
* add comment about side effects
Diffstat (limited to 'internal/db/bundb/status.go')
| -rw-r--r-- | internal/db/bundb/status.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/db/bundb/status.go b/internal/db/bundb/status.go index fea5594dd..8383a9c01 100644 --- a/internal/db/bundb/status.go +++ b/internal/db/bundb/status.go @@ -299,11 +299,12 @@ func (s *statusDB) PopulateStatus(ctx context.Context, status *gtsmodel.Status) if status.CreatedWithApplicationID != "" && status.CreatedWithApplication == nil { // Populate the status' expected CreatedWithApplication (not always set). + // Don't error on ErrNoEntries, as the application may have been cleaned up. status.CreatedWithApplication, err = s.state.DB.GetApplicationByID( gtscontext.SetBarebones(ctx), status.CreatedWithApplicationID, ) - if err != nil { + if err != nil && !errors.Is(err, db.ErrNoEntries) { errs.Appendf("error populating status application: %w", err) } } |
