Commit 88032d2
committed
Add max length checking
As we are appending data to the end of a slug it adds additional length
to the slug. This can mean we have gone past the fields length causing
database errors.
As we are passing a manager and the field name into the function we can
determine the maximum length of the field and limit the slug to that
length.1 parent 0b64728 commit 88032d2
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
0 commit comments