mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-29 19:32:14 +00:00
Revert to old method of sample data gen
bulk_create is super quick, but no autoincrement on sqlite is killer when trying to run tests.
This commit is contained in:
@@ -13,6 +13,7 @@ from django.views.decorators.csrf import csrf_exempt
|
||||
from PyRIGS.views import GenericListView, GenericDetailView, GenericUpdateView, GenericCreateView, ModalURLMixin, \
|
||||
is_ajax, OEmbedView
|
||||
from assets import forms, models
|
||||
from assets.models import get_available_asset_id
|
||||
|
||||
|
||||
class AssetList(LoginRequiredMixin, generic.ListView):
|
||||
@@ -139,7 +140,7 @@ class AssetCreate(LoginRequiredMixin, generic.CreateView):
|
||||
|
||||
def get_initial(self, *args, **kwargs):
|
||||
initial = super().get_initial(*args, **kwargs)
|
||||
initial["asset_id"] = models.Asset.get_available_asset_id()
|
||||
initial["asset_id"] = get_available_asset_id()
|
||||
return initial
|
||||
|
||||
def get_success_url(self):
|
||||
|
||||
Reference in New Issue
Block a user