mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 06:22:16 +00:00
Add description field to TrainingItems (#523)
* Add 'description' field to TrainingItems Renamed existing field to name, removed the dummy property. * Initial version of training item export view * Fix line length issue and better spacing on exported PDF * Added export button to item list * pep8 * Implement code doctor tweaks * Attempt to fix odd deployment issue * Pad headers slightly * Fix page numbering
This commit is contained in:
@@ -102,7 +102,8 @@ class AssetManager(models.Manager):
|
||||
|
||||
def get_available_asset_id(wanted_prefix=""):
|
||||
last_asset = Asset.objects.filter(asset_id_prefix=wanted_prefix).last()
|
||||
return 9000 if last_asset is None else wanted_prefix + str(last_asset.asset_id_number + 1)
|
||||
last_asset_id = last_asset.asset_id_number if last_asset else 0
|
||||
return wanted_prefix + str(last_asset_id + 1)
|
||||
|
||||
|
||||
def validate_positive(value):
|
||||
|
||||
Reference in New Issue
Block a user