Skip to content

Commit a3ce05b

Browse files
committed
A different fix for the shepherd writeup edit test.
- Legacy-Id: 5699
1 parent 45cd878 commit a3ce05b

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

ietf/idrfc/utils.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,16 +187,11 @@ def can_edit_base(doc, user):
187187
can_edit_consensus = can_edit_base
188188
can_edit_shepherd = can_edit_base
189189

190-
import debug
191-
@debug.trace
192190
def can_edit_shepherd_writeup(doc, user):
193-
try:
194-
person = user.person
195-
except Person.DoesNotExist:
196-
person = None
197-
return user.is_authenticated() and (
198-
(person and doc.shepherd==person)
199-
)
191+
if user.is_authenticated():
192+
if Person.objects.filter(user=user).count():
193+
return can_edit_base(doc,user) or (doc.shepherd==user.person)
194+
return False
200195

201196
def nice_consensus(consensus):
202197
mapping = {

0 commit comments

Comments
 (0)