Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix release error due to later loading of extruder settings #252

Merged
merged 3 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

<!--
<!--
;;;;;
;;;;;
;;;;;
Expand All @@ -19,7 +19,7 @@ assignees: ''

If you are reporting an issue, you **must** attach a System Info bundle to the issue so I can troubleshoot it.

If you create an issue without one, then I'll ask you to submit one and will wait until you do.
If you create an issue without one, then I'll ask you to submit one and will wait until you do.

Please save us both time, and do this first. You can find instructions here:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
python-version: 3.8

- name: Install Python dependencies
run: pip install black flake8
run: pip install flake8

- name: Run linters
uses: wearerequired/lint-action@v1
with:
black: true
# black: true
flake8: true
# These must match .pre-commit-config.yaml
flake8_args: "--max-line-length=88 --ignore=E203,E266,E501,W503,F403,F401,E402,F821"
flake8_args: "--max-line-length=88 --ignore=E203,E266,E501,W503,F403,F401,E402,F821,E721"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ repos:
# these are errors that will be ignored by flake8
# check out their meaning here
# https://flake8.pycqa.org/en/latest/user/error-codes.html
- "--ignore=E203,E266,E501,W503,F403,F401,E402,F821"
- "--ignore=E203,E266,E501,W503,F403,F401,E402,F821,E721"
12 changes: 11 additions & 1 deletion continuousprint/static/js/continuousprint_viewmodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ function CPViewModel(parameters) {
self.printerProfiles = parameters[3];
self.settings = parameters[4];
self.cpPrinterProfiles = CP_PRINTER_PROFILES;
self.extruders = ko.computed(function() { return self.printerProfiles.currentProfileData().extruder.count(); });
self.extruders = ko.computed(function() {
let cpd = self.printerProfiles.currentProfileData();
if (cpd) {
return cpd.extruder.count();
} else {
return 1;
}
});
self.status = ko.observable("Initializing...");
self.statusType = ko.observable("INIT");
self.active = ko.observable(false);
Expand Down Expand Up @@ -358,6 +365,9 @@ function CPViewModel(parameters) {
self.badMaterialCount(nbad);
self.hasSpoolManager(true);
}, function(statusCode, errText) {
if (statusCode !== 404) {
console.error(statusCode, errText);
}
self.hasSpoolManager(statusCode !== 404);
});

Expand Down
2 changes: 1 addition & 1 deletion continuousprint/templates/continuousprint_tab.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
Hint: Install the <a href="https://plugins.octoprint.org/plugins/SpoolManager/" target="_blank">SpoolManager</a> plugin to enable <a href="https://smartin015.github.io/continuousprint/material-selection/" target="_blank">material selection</a>.
</div>
<div class="hint" data-bind="visible: $root.hasSpoolManager() && $root.materials().length == 0">
Hint: Add spools, then reload to enable <a href="https://smartin015.github.io/continuousprint/material-selection/" target="_blank">material selection</a>.
Hint: Add spools with materials, then reload to enable <a href="https://smartin015.github.io/continuousprint/material-selection/" target="_blank">material selection</a>.
</div>
<button class="btn pull-right" data-bind="click: remove" title="delete set">
<i style="cursor: pointer" class="far fa-trash-alt"></i> Delete
Expand Down
Loading