diff --git a/CommonServer/Services/DatabaseService.ts b/CommonServer/Services/DatabaseService.ts index 973d49f7ab..df4b4e3657 100644 --- a/CommonServer/Services/DatabaseService.ts +++ b/CommonServer/Services/DatabaseService.ts @@ -1000,6 +1000,10 @@ class DatabaseService { createdAt: SortOrder.Descending, }; + if (!findBy.select) { + findBy.select = {} as any; + } + if (!(findBy.select as any)['createdAt']) { (findBy.select as any)['createdAt'] = true; automaticallyAddedCreatedAtInSelect = true; diff --git a/README.md b/README.md index 368b60bd85..9cad748aaf 100644 --- a/README.md +++ b/README.md @@ -105,3 +105,7 @@ We <3 contributions big and small. In priority order (although everything is app - Write tests for some of our codebase. [See issues here](https://github.com/OneUptime/oneuptime/issues?q=is%3Aopen+is%3Aissue+label%3A%22write+tests%22) - Work on any issue you like. [See issues here](https://github.com/OneUptime/oneuptime/issues) - Open new issues and create new feature requests that you would like to see. [Open issues here](https://github.com/OneUptime/oneuptime/issues) + +## Donate + +If you like the project, please consider a small donation. Every single dollar will be used to ship new features or maintain existing ones. 100% of the work we do is open-source. [Please donate here](https://github.com/sponsors/OneUptime)