Skip to content

Commit

Permalink
Merge pull request #265 from alyf-de/link-user-to-member
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed May 7, 2024
2 parents a5eda78 + 5b21ded commit 97030b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (c) 2013, Real Experts GmbH and contributors
# For license information, please see license.txt

import pandas as pd

import frappe
import pandas as pd
from frappe import _

from ..member.member import Member, get_link_filters, remove_duplicate_indices


Expand Down
3 changes: 3 additions & 0 deletions landa/organization_management/user/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def validate(doc: User, event=None):
_("User {0} is already linked to LANDA Member {1}").format(existing_user, doc.landa_member)
)

if not doc.landa_member and not frappe.flags.in_test:
frappe.throw(_("Please link the user to a LANDA Member."))

if not doc.module_profile and not frappe.flags.in_test:
doc.module_profile = "LANDA User"

Expand Down
1 change: 1 addition & 0 deletions landa/translations/de.csv
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ Extra Columns,Zusätzliche Spalten,
Water Body Status,Gewässerstatus,
Row {0}: Item {1} is not valid for year of settlement {2}.,Zeile {0}: Artikel {1} ist nicht gültig für das Abrechnungsjahr {2}.,
We've received your query!,Wir haben Ihre Anfrage erhalten!,
Please link the user to a LANDA Member.,Bitte verknüpfen Sie den Benutzer mit einem Mitglied.,

0 comments on commit 97030b5

Please sign in to comment.