Skip to content

Commit

Permalink
Some comments for clarifty
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianDAlessandro committed Dec 5, 2022
1 parent 2abb2d0 commit 069a2f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def post(self, request, *args, **kwargs):
form = self.form_class(request.POST, request.FILES)
form.instance.user_owner = request.user
context = self.get_context_data()
context["form"] = form
context["form"] = form # update form in context for form errors in render
if form.is_valid():
# Save instance incluing setting user owner and status
with transaction.atomic():
Expand Down
6 changes: 3 additions & 3 deletions tests/battDB/baker_recipes.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
device_specification = Recipe(
DeviceSpecification,
user_owner=foreign_key(user),
name=seq("Device Specification"),
name=seq("Device Specification"), # Ensure uniqueness
)

device_parameter = Recipe(
Expand Down Expand Up @@ -64,14 +64,14 @@
Equipment,
institution=foreign_key(org),
user_owner=foreign_key(user),
name=seq("Equipment"),
name=seq("Equipment"), # Ensure uniqueness
)

experiment = Recipe(
Experiment,
config=foreign_key(device_config),
user_owner=foreign_key(user),
name=seq("Experiment"),
name=seq("Experiment"), # Ensure uniqueness
)

edf = Recipe(ExperimentDataFile, user_owner=foreign_key(user))
Expand Down

0 comments on commit 069a2f9

Please sign in to comment.