Skip to content

Commit 4ca849c

Browse files
author
Brylie Christopher Oxley
committed
Lint/fix typo
1 parent 9f6a878 commit 4ca849c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

simple_history/models.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,15 @@ def get_next_record(self):
425425

426426
def get_next_record_diff(self):
427427
"""
428-
Get the difference between this and the next record. `None` of no next record.
428+
Get the difference between this and the next record.
429+
430+
Return the diff or `None` of no next record.
429431
"""
430432

431433
next_record = self.get_next_record()
432434

433435
if next_record is not None:
434-
return self.diff_against(previous_record)
436+
return self.diff_against(next_record)
435437

436438
return None
437439

@@ -448,9 +450,12 @@ def get_prev_record(self):
448450

449451
def get_prev_record_diff(self):
450452
"""
451-
Get the difference between this and the previous record. `None` if no previous record.
453+
Get the difference between this and the previous record.
454+
455+
The diff should be based on the previous record,
456+
since the diff uses `old_record` and `new_record` semantics.
452457
453-
The diff should be based on the previous record, since the diff uses `old_record` and `new_record` semantics.
458+
Return the diff or `None` if no previous record.
454459
"""
455460

456461
previous_record = self.get_prev_record()

0 commit comments

Comments
 (0)