Skip to content

Commit

Permalink
fix organization name; fix error import
Browse files Browse the repository at this point in the history
  • Loading branch information
mipyykko committed Aug 17, 2023
1 parent 4f89940 commit 94d21d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { render, tokenize } from "micromustache"

import { EmailTemplate, Organization, User } from "@prisma/client"

import { EmailTemplaterError } from "../../../../lib/errors"
import * as Templates from "./templates"
import {
KeywordToTemplate,
Expand All @@ -10,7 +11,6 @@ import {
} from "./types/KeywordToTemplate"
import { TemplateContext } from "./types/TemplateContext"
import { TemplateParams } from "./types/TemplateParams"
import { EmailTemplaterError } from "/lib/errors"

const templates: KeywordToTemplateConstructor = {
completion_link: Templates.CompletionLink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,7 @@ export class OrganizationActivationCode extends OrganizationTemplate {

export class OrganizationName extends OrganizationTemplate {
async resolve() {
const organizationTranslation =
await this.context.prisma.organizationTranslation.findFirst({
where: {
organization_id: this.organization.id,
},
})

return organizationTranslation?.name ?? ""
return this.organization.name ?? ""
}
}

Expand Down

0 comments on commit 94d21d6

Please sign in to comment.