Skip to content

Commit

Permalink
fix(raven): patch The-Commit-Company/raven#1064
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Sep 19, 2024
1 parent 1ea32d2 commit 4d021e6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/overlays/frappe/raven/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
python,
extractFrappeMeta,
mkAssets,
applyPatches,
}:
buildPythonPackage rec {
inherit
Expand All @@ -16,7 +17,16 @@ buildPythonPackage rec {
format
;

src = mkAssets appSources.raven;
src = mkAssets (appSources.raven
// {
src = applyPatches {
inherit (appSources.raven) src;
name = "raven-prod";
patches = [
./raven-pr1064-fix-return-type.patch
];
};
});
inherit (appSources.raven) passthru;

nativeBuildInputs = [
Expand Down
22 changes: 22 additions & 0 deletions src/overlays/frappe/raven/raven-pr1064-fix-return-type.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From ca3b8e939572dc5639dfb53a9ad104c6cfba55a3 Mon Sep 17 00:00:00 2001
From: David <dgx.arnold@gmail.com>
Date: Wed, 18 Sep 2024 14:43:25 +0200
Subject: [PATCH] fix: return type can be None

---
raven/raven_integrations/controllers/employee.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/raven/raven_integrations/controllers/employee.py b/raven/raven_integrations/controllers/employee.py
index 549111d5..a2ed838c 100644
--- a/raven/raven_integrations/controllers/employee.py
+++ b/raven/raven_integrations/controllers/employee.py
@@ -49,7 +49,7 @@ def on_update(doc, method):

old_doc = doc.get_doc_before_save()

- if old_doc.department:
+ if old_doc and old_doc.department:
# Remove the employee as a member from the channel
old_channel = get_channel_for_department(old_doc.department)

0 comments on commit 4d021e6

Please sign in to comment.