PEP fixes

This commit is contained in:
Oliver Walters 2019-04-30 19:17:54 +10:00
parent 11d3975860
commit d518739643
3 changed files with 7 additions and 9 deletions

View File

@ -135,7 +135,7 @@ class BuildItem(models.Model):
def get_absolute_url(self):
# TODO - Fix!
return '/build/item/{pk}/'.format(pk=self.id)
#return reverse('build-detail', kwargs={'pk': self.id})
# return reverse('build-detail', kwargs={'pk': self.id})
class Meta:
unique_together = [

View File

@ -12,7 +12,6 @@ from django.forms import HiddenInput
from part.models import Part
from .models import Build, BuildItem
from stock.models import StockItem
from .forms import EditBuildForm, EditBuildItemForm
from InvenTree.views import AjaxView, AjaxUpdateView, AjaxCreateView, AjaxDeleteView
@ -219,4 +218,4 @@ class BuildItemEdit(AjaxUpdateView):
def get_data(self):
return {
'info': 'Updated Build Item',
}
}

View File

@ -1,4 +1,4 @@
function makeBuildTable(table, options) {
function makeBuildTable(build_table, options) {
/* Construct a table for allocation items to a build.
* Each row contains a sub_part for the BOM.
* Each row can be expended to allocate stock items against that part.
@ -23,7 +23,6 @@ function makeBuildTable(table, options) {
$("#part-table-" + row.pk),
index,
row,
table,
{
build: options.build
},
@ -77,11 +76,11 @@ function makeBuildTable(table, options) {
{
part: options.part
}).then(function(response) {
table.bootstrapTable('load', response)
});
build_table.bootstrapTable('load', response);
});
// Button callbacks
table.on('click', '.new-item-button', function() {
build_table.on('click', '.new-item-button', function() {
var button = $(this);
launchModalForm(button.attr('url'), {
@ -109,7 +108,7 @@ function makeAllocationTable(options) {
return table;
}
function fillAllocationTable(table, index, parent_row, parent_table, options) {
function fillAllocationTable(table, index, parent_row, options) {
/* Load data into an allocation table,
* and update the total stock allocation count in the parent row.
*